From 0508055ee9b77fe3d358ca401d3e74185cb7bfc0 Mon Sep 17 00:00:00 2001 From: AD7six Date: Sun, 17 Apr 2011 12:25:02 +0200 Subject: [PATCH] remove CAKE_TEST_LIB constant --- app/webroot/test.php | 2 +- lib/Cake/Console/templates/skel/webroot/test.php | 2 +- lib/Cake/TestSuite/CakeTestSuiteDispatcher.php | 8 ++++---- lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php | 8 ++++---- lib/Cake/bootstrap.php | 5 ----- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/webroot/test.php b/app/webroot/test.php index ffcedfe39..f216a4cdd 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -75,6 +75,6 @@ if (Configure::read('debug') < 1) { die(__d('cake', 'Debug setting does not allow access to this url.')); } -require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php'; +require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run(); diff --git a/lib/Cake/Console/templates/skel/webroot/test.php b/lib/Cake/Console/templates/skel/webroot/test.php index cb9180331..89b5eae3d 100644 --- a/lib/Cake/Console/templates/skel/webroot/test.php +++ b/lib/Cake/Console/templates/skel/webroot/test.php @@ -75,6 +75,6 @@ if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.')); } -require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php'; +require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run(); diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 0949468b1..1cd0242dc 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -123,7 +123,7 @@ class CakeTestSuiteDispatcher { $found = $this->loadTestFramework(); if (!$found) { $baseDir = $this->_baseDir; - include CAKE_TESTS_LIB . 'templates/phpunit.php'; + include CAKE . 'TestSuite' . DS . 'templates' . DS . 'phpunit.php'; exit(); } } @@ -166,7 +166,7 @@ class CakeTestSuiteDispatcher { function _checkXdebug() { if (!extension_loaded('xdebug')) { $baseDir = $this->_baseDir; - include CAKE_TESTS_LIB . 'templates/xdebug.php'; + include CAKE . 'TestSuite' . DS . 'templates' . DS . 'xdebug.php'; exit(); } } @@ -238,7 +238,7 @@ class CakeTestSuiteDispatcher { 'baseUrl' => $this->_baseUrl, 'baseDir' => $this->_baseDir, ); - + $options = array( '--filter', $this->params['filter'], '--output', $this->params['output'], @@ -252,7 +252,7 @@ class CakeTestSuiteDispatcher { } catch (MissingConnectionException $exception) { ob_end_clean(); $baseDir = $this->_baseDir; - include CAKE_TESTS_LIB . 'templates' . DS . 'missing_connection.php'; + include CAKE . 'TestSuite' . DS . 'templates' . DS . 'missing_connection.php'; exit(); } } diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index 428b11d85..2ef0338ee 100644 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -51,7 +51,7 @@ class CakeHtmlReporter extends CakeBaseReporter { public function paintDocumentStart() { ob_start(); $baseDir = $this->params['baseDir']; - include CAKE_TESTS_LIB . 'templates' . DS . 'header.php'; + include CAKE . 'TestSuite' . DS . 'templates' . DS . 'header.php'; } /** @@ -64,7 +64,7 @@ class CakeHtmlReporter extends CakeBaseReporter { $cases = $this->baseUrl() . '?show=cases'; $plugins = App::objects('plugin', null, false); sort($plugins); - include CAKE_TESTS_LIB . 'templates' . DS . 'menu.php'; + include CAKE . 'TestSuite' . DS . 'templates' . DS . 'menu.php'; } /** @@ -212,7 +212,7 @@ class CakeHtmlReporter extends CakeBaseReporter { */ public function paintDocumentEnd() { $baseDir = $this->params['baseDir']; - include CAKE_TESTS_LIB . 'templates/footer.php'; + include CAKE . 'TestSuite' . DS . 'templates' . DS . 'footer.php'; if (ob_get_length()) { ob_end_flush(); } @@ -343,4 +343,4 @@ class CakeHtmlReporter extends CakeBaseReporter { } echo '

' . __d('cake_dev', 'Running %s', $suite->getName()) . '

'; } -} \ No newline at end of file +} diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 9b64e6e0c..ddcb6255c 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -94,11 +94,6 @@ if (!defined('CAKE_TESTS')) { define('CAKE_TESTS', CAKE.'Test'.DS); } -/** - * Path to the test suite. - */ - define('CAKE_TESTS_LIB', LIBS . 'TestSuite' . DS); - /** * Path to the controller test directory. */