Commit e653d1ba authored by meus's avatar meus

fixing graphical coverage report

parent 554c26a9
...@@ -42,14 +42,16 @@ $result = unserialize(file_get_contents("coverage.txt")); ...@@ -42,14 +42,16 @@ $result = unserialize(file_get_contents("coverage.txt"));
$coverage = $result["coverage"]; $coverage = $result["coverage"];
function getCoverageReport($file){ function getCoverageReport($file){
global $coverage; global $result;
$coverage = $result["coverage"];
$path = $result["coverage"];
$html = '<div id="coverage">'; $html = '<div id="coverage">';
if(!isset($coverage[$file])){ if(!isset($coverage[$file])){
$html .= 'No coverage for this file</div>'; $html .= 'No coverage for this file</div>';
return $html; return $html;
} }
$coveredLines = $coverage[$file]; $coveredLines = $coverage[$file];
$fileArray = file($file); $fileArray = file(str_replace($path, Doctrine::getPath(), $file));
$html .= '<dl class="table-display">' . "\n"; $html .= '<dl class="table-display">' . "\n";
foreach($fileArray as $num => $line){ foreach($fileArray as $num => $line){
$linenum = $num+1; $linenum = $num+1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment