2 require_once 'SebastianBergmann/CodeCoverage/autoload.php';
4 function coverage_shutdown($oCoverage)
7 $writer = new \SebastianBergmann\CodeCoverage\Report\PHP;
8 $writer->process($oCoverage, $_SERVER['PHP_CODE_COVERAGE_FILE']);
11 $covfilter = new SebastianBergmann\CodeCoverage\Filter();
12 $covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR']);
13 $coverage = new SebastianBergmann\CodeCoverage\CodeCoverage(null, $covfilter);
14 $coverage->start($_SERVER['COV_TEST_NAME']);
16 register_shutdown_function('coverage_shutdown', $coverage);
18 include $_SERVER['COV_SCRIPT_FILENAME'];