diff --git a/RoboFile.php b/RoboFile.php index 31b9892..0f1a349 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -96,11 +96,11 @@ class RoboFile extends \Robo\Tasks { if (extension_loaded("pcov")) { return "$php -d pcov.enabled=1 -d pcov.directory=$code"; } elseif (extension_loaded("xdebug")) { - return $php; + return "$php -d xdebug.mode=coverage"; } elseif (file_exists($dir."pcov.$ext")) { return "$php -d extension=pcov.$ext -d pcov.enabled=1 -d pcov.directory=$code"; } elseif (file_exists($dir."xdebug.$ext")) { - return "$php -d zend_extension=xdebug.$ext"; + return "$php -d zend_extension=xdebug.$ext -d xdebug.mode=coverage"; } else { if (IS_WIN) { $dbg = dirname(\PHP_BINARY)."\\phpdbg.exe"; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 2e4c251..c8f3650 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -16,5 +16,9 @@ error_reporting(\E_ALL); require_once BASE."vendor".DIRECTORY_SEPARATOR."autoload.php"; if (function_exists("xdebug_set_filter")) { - xdebug_set_filter(\XDEBUG_FILTER_CODE_COVERAGE, \XDEBUG_PATH_WHITELIST, [BASE."lib/"]); + if (defined("XDEBUG_PATH_INCLUDE")) { + xdebug_set_filter(\XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_PATH_INCLUDE, [BASE."lib/"]); + } else { + xdebug_set_filter(\XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_PATH_WHITELIST, [BASE."lib/"]); + } }