diff --git a/README.md b/README.md index c4f95dc..a12c138 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ If you execute `bin/behat` command, you will see code coverage generated in This extension now supports [phpdbg][6], which results in faster execution when using more recent versions of PHP. Run `phpspec` via [phpdbg][6]: - $ phpdbg -qrr bin/behat run + $ phpdbg -qrr bin/behat ## Configuration diff --git a/composer.json b/composer.json index 8cc5377..e517bf0 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ }, "require": { "php": ">=5.6", - "phpunit/php-code-coverage": "^6.0", + "phpunit/php-code-coverage": "^9.0", "behat/behat": "^3.0", "guzzlehttp/guzzle": "^6.0", "symfony/config": "^2.3||^3.0||^4.0", diff --git a/src/Common/Report/Php.php b/src/Common/Report/Php.php index 0248963..81c132f 100644 --- a/src/Common/Report/Php.php +++ b/src/Common/Report/Php.php @@ -48,6 +48,17 @@ public function __construct(array $options) */ public function process(CodeCoverage $coverage) { + if (getenv('ENV_TEST_INC_NUMBER')) { + $slot = getenv('ENV_TEST_INC_NUMBER'); + } else { + $slot = '1'; + } + + $suite = getenv('BEHAT_PHING_TARGET') ? getenv('BEHAT_PHING_TARGET') : 'default'; + + $this->options['target'] = str_replace('{n}', $slot, $this->options['target']); + $this->options['target'] = str_replace('{suite}', $suite, $this->options['target']); + return $this->report->process( $coverage, $this->options['target'] diff --git a/src/Resources/config/services-2.3.xml b/src/Resources/config/services-2.3.xml index f29ab07..5b2c564 100644 --- a/src/Resources/config/services-2.3.xml +++ b/src/Resources/config/services-2.3.xml @@ -23,6 +23,7 @@ %behat.code_coverage.config.report% + SebastianBergmann\CodeCoverage\Driver\PHPDBG LeanPHP\Behat\CodeCoverage\Common\Driver\HHVM LeanPHP\Behat\CodeCoverage\Common\Driver\XCache SebastianBergmann\CodeCoverage\Driver\Xdebug @@ -37,6 +38,11 @@ + + + diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml index e66c6c6..a696736 100644 --- a/src/Resources/config/services.xml +++ b/src/Resources/config/services.xml @@ -23,6 +23,7 @@ %behat.code_coverage.config.report% + SebastianBergmann\CodeCoverage\Driver\PHPDBG LeanPHP\Behat\CodeCoverage\Common\Driver\HHVM LeanPHP\Behat\CodeCoverage\Common\Driver\XCache SebastianBergmann\CodeCoverage\Driver\Xdebug @@ -37,6 +38,11 @@ + + +