Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moving header and menu display into CakeHtmlReporter.
Updating header.php with new variable.
  • Loading branch information
markstory committed Jan 7, 2010
1 parent b6e2270 commit c01276a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
3 changes: 0 additions & 3 deletions cake/tests/lib/cake_test_suite_dispatcher.php
Expand Up @@ -86,9 +86,6 @@ function CakeTestSuiteDispatcher() {
* @return void
*/
function dispatch() {
CakeTestMenu::testHeader();
CakeTestMenu::testSuiteHeader();

$this->_checkSimpleTest();
$this->_parseParams();

Expand Down
22 changes: 22 additions & 0 deletions cake/tests/lib/reporter/cake_html_reporter.php
Expand Up @@ -106,10 +106,32 @@ function CakeHtmlReporter($character_set = 'ISO-8859-1', $params = array()) {
*/
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
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/templates/header.php
Expand Up @@ -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">
Expand Down

0 comments on commit c01276a

Please sign in to comment.