diff --git a/app/webroot/index.php b/app/webroot/index.php index c0e90b343..77b9db786 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -49,7 +49,7 @@ * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); } /** @@ -65,7 +65,7 @@ } if (!defined('CORE_PATH')) { define('APP_PATH', ROOT . DS . APP_DIR . DS); - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS . 'lib' . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); diff --git a/app/webroot/test.php b/app/webroot/test.php index deef49aa5..c7b718ca7 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -45,11 +45,11 @@ ini_set('display_errors', 1); define('APP_DIR', basename(dirname(dirname(__FILE__)))); } /** - * The absolute path to the "cake" directory, WITHOUT a trailing DS. + * The absolute path to the "Cake" directory, WITHOUT a trailing DS. * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); } /** @@ -65,7 +65,7 @@ if (!defined('WWW_ROOT')) { } if (!defined('CORE_PATH')) { define('APP_PATH', ROOT . DS . APP_DIR . DS); - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS . 'lib' . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index 0d4ef5d6f..6198bc338 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -85,10 +85,10 @@ class ShellDispatcher { if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('DS', DIRECTORY_SEPARATOR); - define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(dirname(__FILE__))))); + define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(__FILE__)))); define('CAKEPHP_SHELL', true); if (!defined('CORE_PATH')) { - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS . 'lib' . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } } } diff --git a/lib/Cake/tests/cases/console/shell_dispatcher.test.php b/lib/Cake/tests/cases/console/shell_dispatcher.test.php index 5438efdfb..4e2f8efe4 100644 --- a/lib/Cake/tests/cases/console/shell_dispatcher.test.php +++ b/lib/Cake/tests/cases/console/shell_dispatcher.test.php @@ -16,7 +16,8 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; + +App::uses('ShellDispatcher', 'Console'); /** * TestShellDispatcher class @@ -118,8 +119,7 @@ class ShellDispatcherTest extends CakeTestCase { 'plugins' => array( LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS ), - 'shells' => array( - CORE_PATH ? CONSOLE_LIBS : ROOT . DS . CONSOLE_LIBS, + 'Console/Command' => array( LIBS . 'tests' . DS . 'test_app' . DS . 'console' . DS . 'shells' . DS ) ), true);