X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3fba5e786763b3a31c3721b7e5719228a93fdafb..dd03aeb966c2a101759d447a0fa00340812c89da:/test/bdd/steps/cgi-with-coverage.php diff --git a/test/bdd/steps/cgi-with-coverage.php b/test/bdd/steps/cgi-with-coverage.php index 17104d47..6f0d79bb 100644 --- a/test/bdd/steps/cgi-with-coverage.php +++ b/test/bdd/steps/cgi-with-coverage.php @@ -1,13 +1,20 @@ stop(); + $writer = new \SebastianBergmann\CodeCoverage\Report\PHP; + $writer->process($oCoverage, $_SERVER['PHP_CODE_COVERAGE_FILE']); +} + $covfilter = new SebastianBergmann\CodeCoverage\Filter(); -$covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR']); +$covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR'].'/lib-php'); +$covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR'].'/website'); $coverage = new SebastianBergmann\CodeCoverage\CodeCoverage(null, $covfilter); $coverage->start($_SERVER['COV_TEST_NAME']); -include $_SERVER['COV_SCRIPT_FILENAME']; - +register_shutdown_function('coverage_shutdown', $coverage); -$coverage->stop(); -$writer = new \SebastianBergmann\CodeCoverage\Report\PHP; -$writer->process($coverage, $_SERVER['PHP_CODE_COVERAGE_FILE']); +include $_SERVER['COV_SCRIPT_FILENAME'];