Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] fix: warn if no code coverage driver #1060

Merged
merged 1 commit into from Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Plugins/Parallel/Paratest/WrapperRunner.php
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