Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moving header and menu display into CakeHtmlReporter.

Updating header.php with new variable.
  • Loading branch information...
commit c01276a47003a0f05eb23206b7ebd6f562c8f527 1 parent b6e2270
Mark Story markstory authored
3  cake/tests/lib/cake_test_suite_dispatcher.php
View
@@ -86,9 +86,6 @@ function CakeTestSuiteDispatcher() {
* @return void
*/
function dispatch() {
- CakeTestMenu::testHeader();
- CakeTestMenu::testSuiteHeader();
-
$this->_checkSimpleTest();
$this->_parseParams();
22 cake/tests/lib/reporter/cake_html_reporter.php
View
@@ -106,11 +106,33 @@ 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
* scratching your head over out of date test data.
2  cake/tests/lib/templates/header.php
View
@@ -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">
Please sign in to comment.
Something went wrong with that request. Please try again.