From 63b5597632d1252c65be96af3ad1b85b2349bad8 Mon Sep 17 00:00:00 2001 From: phpnut Date: Fri, 23 Nov 2007 01:58:23 +0000 Subject: [PATCH] "Adding new define to test.php setting the core path to the cake directory" git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6062 3807eeeb-6ff5-0310-8944-8be069107fe0 --- app/webroot/test.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/webroot/test.php b/app/webroot/test.php index 4963748cb..965c3e41e 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -62,6 +62,13 @@ ini_set('display_errors', 1); if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_error("Can't find CakePHP core. Check the value of CAKE_CORE_INCLUDE_PATH in app/webroot/test.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } + +$corePath = Configure::corePaths('cake'); +if (isset($corePath[0])) { + define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); +} else { + define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); +} require_once CAKE . 'tests' . DS . 'lib' . DS . 'test_manager.php'; if (Configure::read('debug') < 1) {