diff --git a/cake/tests/lib/cake_test_suite_dispatcher.php b/cake/tests/lib/cake_test_suite_dispatcher.php index 44460719e..59365c818 100644 --- a/cake/tests/lib/cake_test_suite_dispatcher.php +++ b/cake/tests/lib/cake_test_suite_dispatcher.php @@ -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(); } /** diff --git a/cake/tests/lib/reporter/cake_base_reporter.php b/cake/tests/lib/reporter/cake_base_reporter.php index 208e9ca10..dca615863 100644 --- a/cake/tests/lib/reporter/cake_base_reporter.php +++ b/cake/tests/lib/reporter/cake_base_reporter.php @@ -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 in an html page. + * + * @return void + */ + function paintDocumentFooter() { } diff --git a/cake/tests/lib/reporter/cake_html_reporter.php b/cake/tests/lib/reporter/cake_html_reporter.php index 3d5206547..4bb8ea927 100644 --- a/cake/tests/lib/reporter/cake_html_reporter.php +++ b/cake/tests/lib/reporter/cake_html_reporter.php @@ -177,8 +177,7 @@ class CakeHtmlReporter extends SimpleReporter { } echo $this->_paintLinks(); echo ''; - $baseDir = $this->params['baseDir']; - include CAKE_TESTS_LIB . 'templates' . DS . 'footer.php'; + $this->paintDocumentEnd(); } /** @@ -211,6 +210,7 @@ class CakeHtmlReporter extends SimpleReporter { echo "

Run more tests | Show Passes | \n"; echo " Analyze Code Coverage

\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