@@ -16,20 +16,24 @@ public function test()
16
16
$ this ->markTestSkipped ('This test cannot be run on HHVM. ' );
17
17
}
18
18
19
- exec ('php --ri xdebug -d zend_extension=xdebug.so 2> /dev/null ' , $ output , $ returnCode );
20
- if (0 !== $ returnCode ) {
21
- $ this ->markTestSkipped ('Xdebug is required to run this test. ' );
19
+ if (\PHP_VERSION_ID >= 70000 ) {
20
+ $ php = 'phpdbg -qrr ' ;
21
+ } else {
22
+ exec ('php --ri xdebug -d zend_extension=xdebug.so 2> /dev/null ' , $ output , $ returnCode );
23
+ if (0 !== $ returnCode ) {
24
+ $ this ->markTestSkipped ('Xdebug is required to run this test. ' );
25
+ }
26
+ $ php = 'php -d zend_extension=xdebug.so ' ;
22
27
}
23
28
24
29
$ dir = __DIR__ .'/../Tests/Fixtures/coverage ' ;
25
- $ php = PHP_BINARY ;
26
30
$ phpunit = $ _SERVER ['argv ' ][0 ];
27
31
28
- exec ("$ php -d zend_extension=xdebug.so $ phpunit -c $ dir/phpunit-without-listener.xml.dist $ dir/tests/ --coverage-text " , $ output );
32
+ exec ("$ php $ phpunit -c $ dir/phpunit-without-listener.xml.dist $ dir/tests/ --coverage-text " , $ output );
29
33
$ output = implode ("\n" , $ output );
30
34
$ this ->assertContains ('FooCov ' , $ output );
31
35
32
- exec ("$ php -d zend_extension=xdebug.so $ phpunit -c $ dir/phpunit-with-listener.xml.dist $ dir/tests/ --coverage-text " , $ output );
36
+ exec ("$ php $ phpunit -c $ dir/phpunit-with-listener.xml.dist $ dir/tests/ --coverage-text " , $ output );
33
37
$ output = implode ("\n" , $ output );
34
38
$ this ->assertNotContains ('FooCov ' , $ output );
35
39
$ this ->assertContains ("SutNotFoundTest::test \nCould not find the tested class. " , $ output );
0 commit comments