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