@@ -165,11 +165,7 @@ private function getFailedTestList()
165
165
if ($ suiteName == self ::DEFAULT_TEST_GROUP ) {
166
166
array_push ($ failedTestDetails ['tests ' ], $ testName );
167
167
} else {
168
- // Trim potential suite_parallel_0 to suite_parallel
169
- $ suiteNameArray = explode ("_ " , $ suiteName );
170
- if (is_numeric (array_pop ($ suiteNameArray ))) {
171
- $ suiteName = implode ("_ " , $ suiteNameArray );
172
- }
168
+ $ suiteName = $ this ->sanitizeSuiteName ($ suiteName );
173
169
$ failedTestDetails ['suites ' ] = array_merge_recursive (
174
170
$ failedTestDetails ['suites ' ],
175
171
[$ suiteName => [$ testName ]]
@@ -191,6 +187,23 @@ private function getFailedTestList()
191
187
return $ testConfigurationJson ;
192
188
}
193
189
190
+ /**
191
+ * Trim potential suite_parallel_0_G to suite_parallel
192
+ *
193
+ * @param string $suiteName
194
+ * @return string
195
+ */
196
+ private function sanitizeSuiteName ($ suiteName )
197
+ {
198
+ $ suiteNameArray = explode ("_ " , $ suiteName );
199
+ if (array_pop ($ suiteNameArray ) == 'G ' ) {
200
+ if (is_numeric (array_pop ($ suiteNameArray ))) {
201
+ $ suiteName = implode ("_ " , $ suiteNameArray );
202
+ }
203
+ }
204
+ return $ suiteName ;
205
+ }
206
+
194
207
/**
195
208
* Returns an array of run commands read from the manifest file created post generation
196
209
*
0 commit comments