Skip to content

Commit

Permalink
Do not mark Mutant ask Killed when no tests were executed (#1546)
Browse files Browse the repository at this point in the history
Related to #1545
  • Loading branch information
maks-rafalko committed Aug 7, 2021
1 parent 7b7a132 commit 01f1f62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/TestFramework/PhpUnit/Adapter/PhpUnitAdapter.php
Expand Up @@ -136,7 +136,10 @@ public function testsPass(string $output): bool
// "Warnings!" - e.g. when deprecated functions are used, but tests pass
$isWarning = preg_match('/warnings!/i', $output);

return $isOk || $isOkWithInfo || $isWarning;
// "No tests executed!" - e.g. when --filter option contains too large regular expression
$isNoTestsExecuted = preg_match('/No tests executed!/i', $output);

return $isOk || $isOkWithInfo || $isWarning | $isNoTestsExecuted;
}

public function getMemoryUsed(string $output): float
Expand Down
Expand Up @@ -275,6 +275,8 @@ public function outputProvider(): iterable
yield ['FAILURES!', false];

yield ['ERRORS!', false];

yield ['No tests executed!', true];
}

public function memoryReportProvider(): iterable
Expand Down

0 comments on commit 01f1f62

Please sign in to comment.