[PhpUnitBridge] Make CoverageListenerTest more robust when xdebug is not available

This commit is contained in:
Grégoire Pineau 2017-09-29 11:11:46 +02:00
parent 2e2f02cd36
commit 9fac290b41

View File

@ -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];