minor #24369 [PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available (lyrixx)
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
9fac290
[PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available
This commit is contained in:
commit
ad449ef551
@ -8,7 +8,7 @@ class CoverageListenerTest extends TestCase
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
if ("\n" !== PHP_EOL) {
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
$this->markTestSkipped('This test cannot be run on Windows.');
|
||||
}
|
||||
|
||||
@ -16,6 +16,11 @@ class CoverageListenerTest extends TestCase
|
||||
$this->markTestSkipped('This test cannot be run on HHVM.');
|
||||
}
|
||||
|
||||
exec('php --ri xdebug -d zend_extension=xdebug.so 2> /dev/null', $output, $returnCode);
|
||||
if (0 !== $returnCode) {
|
||||
$this->markTestSkipped('Xdebug is required to run this test.');
|
||||
}
|
||||
|
||||
$dir = __DIR__.'/../Tests/Fixtures/coverage';
|
||||
$php = PHP_BINARY;
|
||||
$phpunit = $_SERVER['argv'][0];
|
||||
|
Reference in New Issue
Block a user