mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +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
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _testCaseList() {
|
function _testCaseList() {
|
||||||
|
$Reporter =& $this->getReporter();
|
||||||
|
$Reporter->paintDocumentHeader();
|
||||||
|
$Reporter->paintTestMenu();
|
||||||
CakeTestMenu::testCaseList();
|
CakeTestMenu::testCaseList();
|
||||||
|
$Reporter->paintDocumentEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,7 +149,11 @@ class CakeTestSuiteDispatcher {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _groupTestList() {
|
function _groupTestList() {
|
||||||
|
$Reporter =& $this->getReporter();
|
||||||
|
$Reporter->paintDocumentHeader();
|
||||||
|
$Reporter->paintTestMenu();
|
||||||
CakeTestMenu::groupTestList();
|
CakeTestMenu::groupTestList();
|
||||||
|
$Reporter->paintDocumentEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,5 +110,25 @@ class CakeBaseReporter extends SimpleReporter {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 $this->_paintLinks();
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
$baseDir = $this->params['baseDir'];
|
$this->paintDocumentEnd();
|
||||||
include CAKE_TESTS_LIB . 'templates' . DS . 'footer.php';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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 "<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";
|
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
|
* Convert an array of parameters into a query string url
|
||||||
*
|
*
|
||||||
|
@ -227,6 +227,16 @@ class CakeHtmlReporter extends SimpleReporter {
|
||||||
return $out;
|
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
|
* Paints the test failure with a breadcrumbs
|
||||||
* trail of the nesting test suites below the
|
* trail of the nesting test suites below the
|
||||||
|
|
Loading…
Add table
Reference in a new issue