mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding paintDocumentFooter and paintDocumentHeader to CakeBaseReporter and CakeHtmlReporter.
Refactoring case list and group lists to use reporter methods.
This commit is contained in:
parent
c01276a470
commit
4c0d90c502
3 changed files with 40 additions and 2 deletions
|
@ -136,7 +136,11 @@ class CakeTestSuiteDispatcher {
|
|||
* @return void
|
||||
*/
|
||||
function _testCaseList() {
|
||||
$Reporter =& $this->getReporter();
|
||||
$Reporter->paintDocumentHeader();
|
||||
$Reporter->paintTestMenu();
|
||||
CakeTestMenu::testCaseList();
|
||||
$Reporter->paintDocumentEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -145,7 +149,11 @@ class CakeTestSuiteDispatcher {
|
|||
* @return void
|
||||
*/
|
||||
function _groupTestList() {
|
||||
$Reporter =& $this->getReporter();
|
||||
$Reporter->paintDocumentHeader();
|
||||
$Reporter->paintTestMenu();
|
||||
CakeTestMenu::groupTestList();
|
||||
$Reporter->paintDocumentEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -107,6 +107,26 @@ class CakeBaseReporter extends SimpleReporter {
|
|||
* @return void
|
||||
*/
|
||||
function groupTestList() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* paints the header of the response from the test suite.
|
||||
* Used to paint things like head elements in an html page.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function paintDocumentHeader() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* paints the end of the response from the test suite.
|
||||
* Used to paint things like </body> in an html page.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function paintDocumentFooter() {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -177,8 +177,7 @@ class CakeHtmlReporter extends SimpleReporter {
|
|||
}
|
||||
echo $this->_paintLinks();
|
||||
echo '</div>';
|
||||
$baseDir = $this->params['baseDir'];
|
||||
include CAKE_TESTS_LIB . 'templates' . DS . 'footer.php';
|
||||
$this->paintDocumentEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,6 +210,7 @@ class CakeHtmlReporter extends SimpleReporter {
|
|||
echo "<p><a href='" . RUN_TEST_LINK . $show . "'>Run more tests</a> | <a href='" . RUN_TEST_LINK . $query . "&show_passes=1'>Show Passes</a> | \n";
|
||||
echo " <a href='" . RUN_TEST_LINK . $query . "&code_coverage=true'>Analyze Code Coverage</a></p>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an array of parameters into a query string url
|
||||
*
|
||||
|
@ -227,6 +227,16 @@ class CakeHtmlReporter extends SimpleReporter {
|
|||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* paints the end of the document html.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function paintDocumentEnd() {
|
||||
$baseDir = $this->params['baseDir'];
|
||||
include CAKE_TESTS_LIB . 'templates' . DS . 'footer.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Paints the test failure with a breadcrumbs
|
||||
* trail of the nesting test suites below the
|
||||
|
|
Loading…
Add table
Reference in a new issue