Skip to content
Permalink
Browse files

Removing paintError() as it is no longer called.

Removing paintMethodStart() and paintMethodEnd() as they are no longer called and reference classes that no longer exist.
Implementing a skip printout for incomplete tests.
  • Loading branch information...
markstory committed Jun 12, 2010
1 parent 2ec6f75 commit b2e61230ade9048655ef25dcfef98861ffc6c991
Showing with 2 additions and 51 deletions.
  1. +1 −29 cake/tests/lib/reporter/cake_base_reporter.php
  2. +1 −22 cake/tests/lib/reporter/cake_html_reporter.php
@@ -122,34 +122,6 @@ public function paintGroupEnd($test_name) {
parent::paintGroupEnd($test_name);
}
/**
* Paints the beginning of a test method being run. This is used
* to start/resume the code coverage tool.
*
* @param string $method The method name being run.
* @return void
*/
public function paintMethodStart($method) {
parent::paintMethodStart($method);
if (!empty($this->params['codeCoverage'])) {
CodeCoverageManager::start();
}
}
/**
* Paints the end of a test method being run. This is used
* to pause the collection of code coverage if its being used.
*
* @param string $method The name of the method being run.
* @return void
*/
public function paintMethodEnd($method) {
parent::paintMethodEnd($method);
if (!empty($this->params['codeCoverage'])) {
CodeCoverageManager::stop();
}
}
/**
* Retrieves a list of test cases from the active Manager class,
* displaying it in the correct format for the reporter subclass
@@ -248,7 +220,7 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
* @param float $time
*/
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
$this->paintSkip($e, $test);
}
/**
@@ -296,30 +296,12 @@ public function paintPass(PHPUnit_Framework_Test $test, $time = null) {
if (isset($this->params['show_passes']) && $this->params['show_passes']) {
echo "<li class='pass'>\n";
echo "<span>Passed</span> ";
//$breadcrumb = $this->getTestList();
//array_shift($breadcrumb);
//echo implode(" -&gt; ", $breadcrumb);
echo "<br />" . $this->_htmlEntities($test->getName()) . " ($time seconds)\n";
echo "</li>\n";
}
}
/**
* Paints a PHP error.
*
* @param string $message Message is ignored.
* @return void
*/
public function paintError($message) {
echo "<li class='error'>\n";
echo "<span>Error</span>";
echo "<div class='msg'>" . $this->_htmlEntities($message) . "</div>\n";
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
echo "<div>" . implode(" -&gt; ", $breadcrumb) . "</div>\n";
echo "</li>\n";
}
/**
* Paints a PHP exception.
*
@@ -334,9 +316,6 @@ public function paintException($exception) {
'] in ['. $exception->getFile() .
' line ' . $exception->getLine() . ']';
echo "<div class='msg'>" . $this->_htmlEntities($message) . "</div>\n";
//$breadcrumb = $this->getTestList();
//array_shift($breadcrumb);
//echo "<div>" . implode(" -&gt; ", $breadcrumb) . "</div>\n";
echo "</li>\n";
}

0 comments on commit b2e6123

Please sign in to comment.
You can’t perform that action at this time.