Skip to content

Commit 3e0def3

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

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Magento/FunctionalTestingFramework/Suite/views/SuiteClass.mustache

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,17 @@ class {{suiteName}} extends \Codeception\GroupObject
181181
private function getTestCount()
182182
{
183183
$config = $this->getGlobalConfig();
184-
if (empty($config['groups']) && empty($config['groups'][self::$group])) {
184+
if (empty($config['groups']) || empty($config['groups'][self::$group])) {
185185
return $this->testCount;
186186
}
187187
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
188-
$pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
188+
$pathToGroupCests = $pathToGroupDir . "*Cest.php";
189189

190-
return count(glob($pathToGroupCests));
190+
$files = glob($pathToGroupCests);
191+
if (is_array($files)) {
192+
return count($files);
193+
}
194+
195+
return $this->testCount;
191196
}
192197
}

0 commit comments

Comments
 (0)