Skip to content

Commit 8294c56

Browse files
committed
MQE-2669: Seprated a run:failed command to generate:failed and run:failed
- fix a bug
1 parent 3e0def3 commit 8294c56

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

dev/tests/verification/Resources/ActionsInDifferentModulesSuite.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,17 @@ class ActionsInDifferentModulesSuite extends \Codeception\GroupObject
225225
private function getTestCount()
226226
{
227227
$config = $this->getGlobalConfig();
228-
if (empty($config['groups']) && empty($config['groups'][self::$group])) {
228+
if (empty($config['groups']) || empty($config['groups'][self::$group])) {
229229
return $this->testCount;
230230
}
231231
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
232-
$pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
232+
$pathToGroupCests = $pathToGroupDir . "*Cest.php";
233233

234-
return count(glob($pathToGroupCests));
234+
$files = glob($pathToGroupCests);
235+
if (is_array($files)) {
236+
return count($files);
237+
}
238+
239+
return $this->testCount;
235240
}
236241
}

dev/tests/verification/Resources/functionalSuiteHooks.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,17 @@ class functionalSuiteHooks extends \Codeception\GroupObject
208208
private function getTestCount()
209209
{
210210
$config = $this->getGlobalConfig();
211-
if (empty($config['groups']) && empty($config['groups'][self::$group])) {
211+
if (empty($config['groups']) || empty($config['groups'][self::$group])) {
212212
return $this->testCount;
213213
}
214214
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
215-
$pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
215+
$pathToGroupCests = $pathToGroupDir . "*Cest.php";
216216

217-
return count(glob($pathToGroupCests));
217+
$files = glob($pathToGroupCests);
218+
if (is_array($files)) {
219+
return count($files);
220+
}
221+
222+
return $this->testCount;
218223
}
219224
}

dev/tests/verification/Resources/functionalSuiteWithComments.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,17 @@ class functionalSuiteWithComments extends \Codeception\GroupObject
188188
private function getTestCount()
189189
{
190190
$config = $this->getGlobalConfig();
191-
if (empty($config['groups']) && empty($config['groups'][self::$group])) {
191+
if (empty($config['groups']) || empty($config['groups'][self::$group])) {
192192
return $this->testCount;
193193
}
194194
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
195-
$pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
195+
$pathToGroupCests = $pathToGroupDir . "*Cest.php";
196196

197-
return count(glob($pathToGroupCests));
197+
$files = glob($pathToGroupCests);
198+
if (is_array($files)) {
199+
return count($files);
200+
}
201+
202+
return $this->testCount;
198203
}
199204
}

0 commit comments

Comments
 (0)