X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/96ecee431b9620849e55fac52487cae3a143c817..62dbbbede6ac6b75d0bd75a0d21016bcdfc61742:/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..165a1b0c 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']); $coverage = new SebastianBergmann\CodeCoverage\CodeCoverage(null, $covfilter); $coverage->start($_SERVER['COV_TEST_NAME']); +register_shutdown_function('coverage_shutdown', $coverage); + include $_SERVER['COV_SCRIPT_FILENAME']; -$coverage->stop(); -$writer = new \SebastianBergmann\CodeCoverage\Report\PHP; -$writer->process($coverage, $_SERVER['PHP_CODE_COVERAGE_FILE']);