Moving header and menu display into CakeHtmlReporter.

Updating header.php with new variable.
This commit is contained in:
Mark Story 2010-01-06 22:42:35 -05:00
parent b6e22704ed
commit c01276a470
3 changed files with 23 additions and 4 deletions

View file

@ -86,9 +86,6 @@ class CakeTestSuiteDispatcher {
* @return void
*/
function dispatch() {
CakeTestMenu::testHeader();
CakeTestMenu::testSuiteHeader();
$this->_checkSimpleTest();
$this->_parseParams();

View file

@ -106,10 +106,32 @@ class CakeHtmlReporter extends SimpleReporter {
*/
function paintHeader($testName) {
$this->sendNoCacheHeaders();
$this->paintDocumentHeader();
$this->paintTestMenu();
echo "<h2>$testName</h2>\n";
echo "<ul class='tests'>\n";
}
/**
* Paints the document header contained in header.php
*
* @return void
*/
function paintDocumentHeader() {
$baseDir = $this->params['baseDir'];
include CAKE_TESTS_LIB . 'templates' . DS . 'header.php';
}
/**
* Paints the menu on the left side of the test suite interface.
* Contains all of the various plugin, core, and app buttons.
*
* @return void
*/
function paintTestMenu() {
CakeTestMenu::testSuiteHeader();
}
/**
* Send the headers necessary to ensure the page is
* reloaded on every request. Otherwise you could be

View file

@ -114,7 +114,7 @@
div.code-coverage-results span.result-ok { color: #fa0; }
div.code-coverage-results span.result-good { color: #0a0; }
</style>
<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>css/cake.generic.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $baseDir; ?>css/cake.generic.css" />
</head>
<body>
<div id="container">