Skip to content

Commit e7f7ae3

Browse files
Merge branch '10.0'
2 parents dddc9b5 + 622835b commit e7f7ae3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/end-to-end/regression/5218.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22
https://github.com/sebastianbergmann/phpunit/issues/5218
33
--INI--
44
pcov.directory=tests/end-to-end/regression/5218/src/
5+
--SKIPIF--
6+
<?php declare(strict_types=1);
7+
if (extension_loaded('pcov')) {
8+
return;
9+
}
10+
11+
if (!extension_loaded('xdebug')) {
12+
print 'skip: This test requires a code coverage driver';
13+
}
14+
15+
if (version_compare(phpversion('xdebug'), '3.1', '>=') && in_array('coverage', xdebug_info('mode'), true)) {
16+
return;
17+
}
18+
19+
$mode = getenv('XDEBUG_MODE');
20+
21+
if ($mode === false || $mode === '') {
22+
$mode = ini_get('xdebug.mode');
23+
}
24+
25+
if ($mode === false ||
26+
!in_array('coverage', explode(',', $mode), true)) {
27+
print 'skip: XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set';
28+
}
529
--FILE--
630
<?php declare(strict_types=1);
731
$_SERVER['argv'][] = '--do-not-cache-result';

0 commit comments

Comments
 (0)