Permalink
Browse files

Correcting classname used in CodeCoverageManager

Moving CodeCoverageManager::report() to be inside the html document.
  • Loading branch information...
1 parent f52900f commit 03da53bb9296193e92f9e35c50ae6d2c323a3b25 @markstory markstory committed Jan 10, 2010
@@ -230,9 +230,6 @@ function _runGroupTest() {
CodeCoverageManager::start($this->params['group'], $Reporter);
}
$this->Manager->runGroupTest(ucfirst($this->params['group']), $Reporter);
- if ($this->params['codeCoverage']) {
- CodeCoverageManager::report();
- }
}
}
@@ -246,12 +243,7 @@ function _runTestCase() {
if ($this->params['codeCoverage']) {
CodeCoverageManager::start($this->params['case'], $Reporter);
}
-
$this->Manager->runTestCase($this->params['case'], $Reporter);
-
- if ($this->params['codeCoverage']) {
- CodeCoverageManager::report();
- }
}
}
?>
@@ -155,7 +155,7 @@ function report($output = true) {
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:
@@ -175,6 +175,13 @@ function paintFooter($test_name) {
}
echo $this->_paintLinks();
echo '</div>';
+ if (
+ isset($this->params['codeCoverage']) &&
+ $this->params['codeCoverage'] &&
+ class_exists('CodeCoverageManager')
+ ) {
+ CodeCoverageManager::report();
+ }
$this->paintDocumentEnd();
}

0 comments on commit 03da53b

Please sign in to comment.