Skip to content

Commit

Permalink
Refactoring and updating footer element to use param based basePath.
Browse files Browse the repository at this point in the history
Moving footer inclusion to CakeHtmlReporter.
  • Loading branch information
markstory committed Jan 6, 2010
1 parent 6b3e958 commit b6e2270
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cake/tests/lib/cake_test_suite_dispatcher.php
Expand Up @@ -102,7 +102,6 @@ function dispatch() {
$this->_groupTestList();
}

CakeTestMenu::footer();
$output = ob_get_clean();
echo $output;
}
Expand All @@ -114,7 +113,7 @@ function dispatch() {
*/
function _checkSimpleTest() {
if (!App::import('Vendor', 'simpletest' . DS . 'reporter')) {
$baseUrl = $this->_baseDir;
$basePath = $this->_baseDir;
include CAKE_TESTS_LIB . 'templates' . DS . 'simpletest.php';
exit();
}
Expand All @@ -128,7 +127,7 @@ function _checkSimpleTest() {
*/
function _checkXdebug() {
if (!extension_loaded('xdebug')) {
$baseUrl = $this->_baseDir;
$basePath = $this->_baseDir;
include CAKE_TESTS_LIB . 'templates' . DS . 'xdebug.php';
exit();
}
Expand Down Expand Up @@ -214,6 +213,8 @@ function _parseParams() {
require_once CAKE_TESTS_LIB . 'code_coverage_manager.php';
$this->_checkXdebug();
}
$this->params['baseUrl'] = $this->_baseUrl;
$this->params['baseDir'] = $this->_baseDir;
$this->getManager();
}

Expand Down
2 changes: 2 additions & 0 deletions cake/tests/lib/reporter/cake_html_reporter.php
Expand Up @@ -155,6 +155,8 @@ function paintFooter($test_name) {
}
echo $this->_paintLinks();
echo '</div>';
$baseDir = $this->params['baseDir'];
include CAKE_TESTS_LIB . 'templates' . DS . 'footer.php';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/templates/footer.php
Expand Up @@ -22,7 +22,7 @@
<div id="footer">
<!--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO-->
<a href="http://www.cakephp.org/" target="_blank">
<img src="<?php echo $baseUrl; ?>img/cake.power.gif" alt="CakePHP(tm) :: Rapid Development Framework" /></a></p>
<img src="<?php echo $baseDir; ?>img/cake.power.gif" alt="CakePHP(tm) :: Rapid Development Framework" /></a></p>
</div>
<?php
App::import('Core', 'View');
Expand Down

0 comments on commit b6e2270

Please sign in to comment.