mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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.
This commit is contained in:
parent
2ec6f75996
commit
b2e61230ad
2 changed files with 2 additions and 51 deletions
|
@ -122,34 +122,6 @@ class CakeBaseReporter implements PHPUnit_Framework_TestListener {
|
|||
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 @@ class CakeBaseReporter implements PHPUnit_Framework_TestListener {
|
|||
* @param float $time
|
||||
*/
|
||||
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
||||
|
||||
$this->paintSkip($e, $test);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -296,30 +296,12 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
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(" -> ", $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(" -> ", $breadcrumb) . "</div>\n";
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Paints a PHP exception.
|
||||
*
|
||||
|
@ -334,9 +316,6 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
'] in ['. $exception->getFile() .
|
||||
' line ' . $exception->getLine() . ']';
|
||||
echo "<div class='msg'>" . $this->_htmlEntities($message) . "</div>\n";
|
||||
//$breadcrumb = $this->getTestList();
|
||||
//array_shift($breadcrumb);
|
||||
//echo "<div>" . implode(" -> ", $breadcrumb) . "</div>\n";
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue