Correcting classname used in CodeCoverageManager

Moving CodeCoverageManager::report() to be inside the html document.
This commit is contained in:
Mark Story 2010-01-09 22:35:29 -05:00
parent f52900f818
commit 03da53bb92
3 changed files with 8 additions and 9 deletions

View file

@ -230,9 +230,6 @@ class CakeTestSuiteDispatcher {
CodeCoverageManager::start($this->params['group'], $Reporter);
}
$this->Manager->runGroupTest(ucfirst($this->params['group']), $Reporter);
if ($this->params['codeCoverage']) {
CodeCoverageManager::report();
}
}
}
@ -246,12 +243,7 @@ class CakeTestSuiteDispatcher {
if ($this->params['codeCoverage']) {
CodeCoverageManager::start($this->params['case'], $Reporter);
}
$this->Manager->runTestCase($this->params['case'], $Reporter);
if ($this->params['codeCoverage']) {
CodeCoverageManager::report();
}
}
}
?>

View file

@ -155,7 +155,7 @@ class CodeCoverageManager {
case 'CakeHtmlReporter':
$result = $manager->reportCaseHtmlDiff(@file($testObjectFile), $coverageData, $execCodeLines, $manager->numDiffContextLines);
break;
case 'CLIReporter':
case 'CakeCliReporter':
$result = $manager->reportCaseCli(@file($testObjectFile), $coverageData, $execCodeLines, $manager->numDiffContextLines);
break;
default:

View file

@ -175,6 +175,13 @@ class CakeHtmlReporter extends CakeBaseReporter {
}
echo $this->_paintLinks();
echo '</div>';
if (
isset($this->params['codeCoverage']) &&
$this->params['codeCoverage'] &&
class_exists('CodeCoverageManager')
) {
CodeCoverageManager::report();
}
$this->paintDocumentEnd();
}