File tree 3 files changed +24
-9
lines changed
dev/tests/verification/Resources
3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -225,12 +225,17 @@ class ActionsInDifferentModulesSuite extends \Codeception\GroupObject
225
225
private function getTestCount()
226
226
{
227
227
$config = $this->getGlobalConfig();
228
- if (empty($config['groups']) && empty($config['groups'][self::$group])) {
228
+ if (empty($config['groups']) || empty($config['groups'][self::$group])) {
229
229
return $this->testCount;
230
230
}
231
231
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
232
- $pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
232
+ $pathToGroupCests = $pathToGroupDir . "*Cest.php";
233
233
234
- return count(glob($pathToGroupCests));
234
+ $files = glob($pathToGroupCests);
235
+ if (is_array($files)) {
236
+ return count($files);
237
+ }
238
+
239
+ return $this->testCount;
235
240
}
236
241
}
Original file line number Diff line number Diff line change @@ -208,12 +208,17 @@ class functionalSuiteHooks extends \Codeception\GroupObject
208
208
private function getTestCount()
209
209
{
210
210
$config = $this->getGlobalConfig();
211
- if (empty($config['groups']) && empty($config['groups'][self::$group])) {
211
+ if (empty($config['groups']) || empty($config['groups'][self::$group])) {
212
212
return $this->testCount;
213
213
}
214
214
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
215
- $pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
215
+ $pathToGroupCests = $pathToGroupDir . "*Cest.php";
216
216
217
- return count(glob($pathToGroupCests));
217
+ $files = glob($pathToGroupCests);
218
+ if (is_array($files)) {
219
+ return count($files);
220
+ }
221
+
222
+ return $this->testCount;
218
223
}
219
224
}
Original file line number Diff line number Diff line change @@ -188,12 +188,17 @@ class functionalSuiteWithComments extends \Codeception\GroupObject
188
188
private function getTestCount()
189
189
{
190
190
$config = $this->getGlobalConfig();
191
- if (empty($config['groups']) && empty($config['groups'][self::$group])) {
191
+ if (empty($config['groups']) || empty($config['groups'][self::$group])) {
192
192
return $this->testCount;
193
193
}
194
194
$pathToGroupDir = TESTS_BP . DIRECTORY_SEPARATOR . array_first($config['groups'][self::$group]);
195
- $pathToGroupCests = $pathToGroupDir . DIRECTORY_SEPARATOR . "*Cest.php";
195
+ $pathToGroupCests = $pathToGroupDir . "*Cest.php";
196
196
197
- return count(glob($pathToGroupCests));
197
+ $files = glob($pathToGroupCests);
198
+ if (is_array($files)) {
199
+ return count($files);
200
+ }
201
+
202
+ return $this->testCount;
198
203
}
199
204
}
You can’t perform that action at this time.
0 commit comments