mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 01:37:21 +01:00
Improves coverage feedback
This commit is contained in:
@ -87,6 +87,24 @@ final class Coverage implements AddsOutput, HandlesArguments
|
||||
$this->coverageMin = (float) $minOption;
|
||||
}
|
||||
|
||||
if (! \Pest\Support\Coverage::isAvailable()) {
|
||||
if (\Pest\Support\Coverage::usingXdebug()) {
|
||||
$this->output->writeln([
|
||||
'',
|
||||
" <fg=default;bg=red;options=bold> ERROR </> Unable to get coverage using Xdebug. Did you set <href=https://xdebug.org/docs/code_coverage#mode>Xdebug's coverage mode</>?</>",
|
||||
'',
|
||||
]);
|
||||
} else {
|
||||
$this->output->writeln([
|
||||
'',
|
||||
' <fg=default;bg=red;options=bold> ERROR </> No code coverage driver is available.</>',
|
||||
'',
|
||||
]);
|
||||
}
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return $originals;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user