Skip to content

Commit 206e599

Browse files
We do not recursively traverse TestSuite here, so $test is always an instance of TestSuite
1 parent c010172 commit 206e599

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/TextUI/Command/Commands/ListTestSuitesCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace PHPUnit\TextUI\Command;
1111

1212
use const PHP_EOL;
13+
use function assert;
1314
use function count;
1415
use function ksort;
1516
use function sprintf;
@@ -36,9 +37,7 @@ public function execute(): Result
3637
$suites = [];
3738

3839
foreach ($this->testSuite->tests() as $test) {
39-
if (!$test instanceof TestSuite) {
40-
continue;
41-
}
40+
assert($test instanceof TestSuite);
4241

4342
$suites[$test->name()] = count($test->collect());
4443
}

0 commit comments

Comments
 (0)