Permalink
Browse files

CliTester: hint message when coverage file is empty

  • Loading branch information...
milo committed Jul 20, 2018
1 parent a3a8569 commit a65fa39e930204842f48bb44f376e8d9583855bd
Showing with 4 additions and 0 deletions.
  1. +4 βˆ’0 src/Runner/CliTester.php
@@ -236,6 +236,10 @@ private function finishCodeCoverage(string $file): void
if (!in_array($this->options['-o'], ['none', 'tap', 'junit'], true)) {
echo 'Generating code coverage report... ';
}
if (filesize($file) === 0) {
echo 'failed. Coverage file is empty. Do you call Tester\Environment::setup() in tests?';
return;
}
if (pathinfo($file, PATHINFO_EXTENSION) === 'xml') {
$generator = new CodeCoverage\Generators\CloverXMLGenerator($file, $this->options['--coverage-src']);
} else {

0 comments on commit a65fa39

Please sign in to comment.