@@ -165,13 +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_G to suite_parallel
169
- $ suiteNameArray = explode ("_ " , $ suiteName );
170
- if (array_pop ($ suiteNameArray ) === 'G ' ) {
171
- if (is_numeric (array_pop ($ suiteNameArray ))) {
172
- $ suiteName = implode ("_ " , $ suiteNameArray );
173
- }
174
- }
168
+ $ suiteName = $ this ->sanitizeSuiteName ($ suiteName );
175
169
$ failedTestDetails ['suites ' ] = array_merge_recursive (
176
170
$ failedTestDetails ['suites ' ],
177
171
[$ suiteName => [$ testName ]]
@@ -193,6 +187,23 @@ private function getFailedTestList()
193
187
return $ testConfigurationJson ;
194
188
}
195
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
+
196
207
/**
197
208
* Returns an array of run commands read from the manifest file created post generation
198
209
*
0 commit comments