Skip to content

Commit

Permalink
Add a warning when using the --skip-initial-test-suite option
Browse files Browse the repository at this point in the history
  • Loading branch information
duncan3dc committed Feb 14, 2020
1 parent f396a47 commit d4830a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Console/ConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,13 @@ public function logNotInControlOfExitCodes(): void
'It is your responsibility to disable xdebug/phpdbg unless needed.',
]);
}

public function logSkippingInitialTestSuite(): void
{
$this->io->warning([
'Skipping the initial test suite run can be very dangerous.' . PHP_EOL .
'It is your responsibility to ensure the test suite is in a passing state to begin.' . PHP_EOL .
'If this is not done then mutations may report as caught when they are not.',
]);
}
}
1 change: 1 addition & 0 deletions src/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function execute(int $threads): bool
private function runInitialTestSuite(): void
{
if ($this->config->shouldSkipInitialTestSuite()) {
$this->consoleOutput->logSkippingInitialTestSuite();
$this->assertCodeCoverageExists(null, $this->config->getTestFramework());
return;
}
Expand Down

0 comments on commit d4830a5

Please sign in to comment.