[PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available
This commit is contained in:
parent
2e2f02cd36
commit
9fac290b41
@ -8,7 +8,7 @@ class CoverageListenerTest extends TestCase
|
|||||||
{
|
{
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
if ("\n" !== PHP_EOL) {
|
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||||
$this->markTestSkipped('This test cannot be run on Windows.');
|
$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.');
|
$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';
|
$dir = __DIR__.'/../Tests/Fixtures/coverage';
|
||||||
$php = PHP_BINARY;
|
$php = PHP_BINARY;
|
||||||
$phpunit = $_SERVER['argv'][0];
|
$phpunit = $_SERVER['argv'][0];
|
||||||
|
Reference in New Issue
Block a user