File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed
Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1313use SebastianBergmann \CodeCoverage \DeadCodeDetectionNotSupportedException ;
1414use SebastianBergmann \CodeCoverage \Filter ;
1515use SebastianBergmann \CodeCoverage \TestCase ;
16- use SebastianBergmann \Environment \Runtime ;
1716
1817final class PcovDriverTest extends TestCase
1918{
2019 protected function setUp (): void
2120 {
22- if (!(new Runtime )->hasPCOV ()) {
23- $ this ->markTestSkipped ('This test is only applicable to PCOV ' );
21+ if (\PHP_SAPI !== 'cli ' ) {
22+ $ this ->markTestSkipped ('This test requires the PHP commandline interpreter ' );
23+ }
24+
25+ if (!\extension_loaded ('pcov ' )) {
26+ $ this ->markTestSkipped ('This test requires the PCOV extension to be loaded ' );
27+ }
28+
29+ if (!\ini_get ('pcov.enabled ' )) {
30+ $ this ->markTestSkipped ('This test requires the PCOV extension to be enabled ' );
2431 }
2532 }
2633
Original file line number Diff line number Diff line change 1212use SebastianBergmann \CodeCoverage \BranchAndPathCoverageNotSupportedException ;
1313use SebastianBergmann \CodeCoverage \DeadCodeDetectionNotSupportedException ;
1414use SebastianBergmann \CodeCoverage \TestCase ;
15- use SebastianBergmann \Environment \Runtime ;
1615
1716final class PhpdbgDriverTest extends TestCase
1817{
1918 protected function setUp (): void
2019 {
21- if (!( new Runtime )-> hasPHPDBGCodeCoverage () ) {
22- $ this ->markTestSkipped ('This test is only applicable to PHPDBG ' );
20+ if (\ PHP_SAPI !== ' phpdbg ' ) {
21+ $ this ->markTestSkipped ('This test requires the PHPDBG commandline interpreter ' );
2322 }
2423 }
2524
Original file line number Diff line number Diff line change 1111
1212use SebastianBergmann \CodeCoverage \Filter ;
1313use SebastianBergmann \CodeCoverage \TestCase ;
14- use SebastianBergmann \Environment \Runtime ;
1514
1615final class XdebugDriverTest extends TestCase
1716{
1817 protected function setUp (): void
1918 {
20- if (!(new Runtime )->hasXdebug ()) {
21- $ this ->markTestSkipped ('This test is only applicable to Xdebug ' );
19+ if (\PHP_SAPI !== 'cli ' ) {
20+ $ this ->markTestSkipped ('This test requires the PHP commandline interpreter ' );
21+ }
22+
23+ if (!\extension_loaded ('xdebug ' )) {
24+ $ this ->markTestSkipped ('This test requires the Xdebug extension to be loaded ' );
25+ }
26+
27+ if (!\ini_get ('xdebug.coverage_enable ' )) {
28+ $ this ->markTestSkipped ('This test requires the Xdebug extension \'s code coverage functionality to be enabled ' );
2229 }
2330
2431 if (!\xdebug_code_coverage_started ()) {
25- $ this ->markTestSkipped ('This test requires code coverage using Xdebug to be running ' );
32+ $ this ->markTestSkipped ('This test requires code coverage data collection using Xdebug to be active ' );
2633 }
2734 }
2835
You can’t perform that action at this time.
0 commit comments