mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: error "No code coverage driver is available" in laravel
This commit is contained in:
@ -122,7 +122,10 @@ final class Command extends BaseCommand
|
||||
|
||||
if ($result === 0 && $this->testSuite->coverage) {
|
||||
if (!Coverage::isAvailable()) {
|
||||
throw new CodeCoverageDriverNotAvailable();
|
||||
$this->output->writeln(
|
||||
"\n <fg=white;bg=red;options=bold> ERROR </> No code coverage driver is available.</>",
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$coverage = Coverage::report($this->output);
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Exceptions;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use NunoMaduro\Collision\Contracts\RenderlessEditor;
|
||||
use NunoMaduro\Collision\Contracts\RenderlessTrace;
|
||||
use Symfony\Component\Console\Exception\ExceptionInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class CodeCoverageDriverNotAvailable extends InvalidArgumentException implements ExceptionInterface, RenderlessEditor, RenderlessTrace
|
||||
{
|
||||
/**
|
||||
* Creates a new instance of test already exist.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('No code coverage driver is available');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user