Skip to content

Commit c2d84f9

Browse files
committed
Fix tests that may trigger failures for empty test suites
See sebastianbergmann/phpunit#6276
1 parent 447ecdd commit c2d84f9

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

tests/Functional/Command/ParallelCommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ public function testExecutionWithoutConfiguration(): void
252252
$commandTester = new CommandTester($command);
253253
$exitCode = $commandTester->execute([
254254
'command' => $command->getName(),
255-
'--pass-through' => ['--filter=do_not_execute_anything'],
255+
'--pass-through' => [
256+
'--filter=do_not_execute_anything',
257+
'--do-not-fail-on-empty-test-suite',
258+
],
256259
]);
257260

258261
$output = $commandTester->getDisplay();

tests/Functional/Runner/RunnerTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ public function testWarning(): void
116116
public function testNoTestExecutedDoesntGetMistakenAsAbnormalTermination(): void
117117
{
118118
$this->setTextFilter('ThreeGreenTestStub.php');
119-
$this->loadContainer(['--group=emptyGroup']);
119+
$this->loadContainer([
120+
'--group=emptyGroup',
121+
'--do-not-fail-on-empty-test-suite',
122+
]);
120123

121124
$this->assertEquals(0, $this->executeRunner());
122125

0 commit comments

Comments
 (0)