laravel-6 support
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
45
vendor/phpunit/php-code-coverage/src/Driver/PCOV.php
vendored
Normal file
45
vendor/phpunit/php-code-coverage/src/Driver/PCOV.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CodeCoverage\Driver;
|
||||
|
||||
/**
|
||||
* Driver for PCOV code coverage functionality.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
final class PCOV implements Driver
|
||||
{
|
||||
/**
|
||||
* Start collection of code coverage information.
|
||||
*/
|
||||
public function start(bool $determineUnusedAndDead = true): void
|
||||
{
|
||||
\pcov\start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop collection of code coverage information.
|
||||
*/
|
||||
public function stop(): array
|
||||
{
|
||||
\pcov\stop();
|
||||
|
||||
$waiting = \pcov\waiting();
|
||||
$collect = [];
|
||||
|
||||
if ($waiting) {
|
||||
$collect = \pcov\collect(\pcov\inclusive, $waiting);
|
||||
|
||||
\pcov\clear();
|
||||
}
|
||||
|
||||
return $collect;
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -38,8 +38,19 @@ final class Xdebug implements Driver
|
||||
throw new RuntimeException('This driver requires Xdebug');
|
||||
}
|
||||
|
||||
if (!\ini_get('xdebug.coverage_enable')) {
|
||||
throw new RuntimeException('xdebug.coverage_enable=On has to be set in php.ini');
|
||||
if (\version_compare(\phpversion('xdebug'), '3', '>=')) {
|
||||
$mode = \getenv('XDEBUG_MODE');
|
||||
|
||||
if ($mode === false) {
|
||||
$mode = \ini_get('xdebug.mode');
|
||||
}
|
||||
|
||||
if ($mode === false ||
|
||||
!\in_array('coverage', \explode(',', $mode), true)) {
|
||||
throw new RuntimeException('XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set');
|
||||
}
|
||||
} elseif (!\ini_get('xdebug.coverage_enable')) {
|
||||
throw new RuntimeException('xdebug.coverage_enable=On has to be set');
|
||||
}
|
||||
|
||||
if ($filter === null) {
|
||||
|
Reference in New Issue
Block a user