Skip to content

Commit

Permalink
Merge pull request #1060 from calebdw/bugfix-code_coverage
Browse files Browse the repository at this point in the history
[2.x] fix: warn if no code coverage driver
  • Loading branch information
nunomaduro authored Jan 25, 2024
2 parents 0060b6f + be407ac commit cfb724c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Plugins/Parallel/Paratest/WrapperRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@ private function generateCodeCoverageReports(): void
$this->codeCoverageFilterRegistry,
false,
);
if (! $coverageManager->isActive()) {
$this->output->writeln([
'',
' <fg=black;bg=yellow;options=bold> WARN </> No code coverage driver is available.</>',
'',
]);

return;
}
$coverageMerger = new CoverageMerger($coverageManager->codeCoverage());
foreach ($this->coverageFiles as $coverageFile) {
$coverageMerger->addCoverageFromFile($coverageFile);
Expand Down

0 comments on commit cfb724c

Please sign in to comment.