Browse Source

remove CAKE_TEST_LIB constant

AD7six 15 years ago
parent
commit
0508055ee9

+ 1 - 1
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();

+ 1 - 1
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();

+ 4 - 4
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();
 		}
 	}

+ 4 - 4
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 '<h2>' . __d('cake_dev', 'Running  %s', $suite->getName())  . '</h2>';
 	}
-}
+}

+ 0 - 5
lib/Cake/bootstrap.php

@@ -95,11 +95,6 @@ if (!defined('CAKE_TESTS')) {
 }
 
 /**
- * Path to the test suite.
- */
-	define('CAKE_TESTS_LIB', LIBS . 'TestSuite' . DS);
-
-/**
  * Path to the controller test directory.
  */
 	define('CONTROLLER_TESTS', TESTS.'Case'.DS.'Controller'.DS);