From be407ac9041ad3f0294479c20683025494c831c4 Mon Sep 17 00:00:00 2001 From: Caleb White Date: Thu, 11 Jan 2024 10:14:44 -0600 Subject: [PATCH] fix: warn if no code coverage driver --- src/Plugins/Parallel/Paratest/WrapperRunner.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Plugins/Parallel/Paratest/WrapperRunner.php b/src/Plugins/Parallel/Paratest/WrapperRunner.php index 46c1f994..b0dc5232 100644 --- a/src/Plugins/Parallel/Paratest/WrapperRunner.php +++ b/src/Plugins/Parallel/Paratest/WrapperRunner.php @@ -363,6 +363,15 @@ private function generateCodeCoverageReports(): void $this->codeCoverageFilterRegistry, false, ); + if (! $coverageManager->isActive()) { + $this->output->writeln([ + '', + ' WARN No code coverage driver is available.', + '', + ]); + + return; + } $coverageMerger = new CoverageMerger($coverageManager->codeCoverage()); foreach ($this->coverageFiles as $coverageFile) { $coverageMerger->addCoverageFromFile($coverageFile);