Fixing constant declaration as it was not consistent in web runner and cli runner

This commit is contained in:
José Lorenzo Rodríguez Urdaneta 2010-07-07 22:58:48 -04:30
parent fa8db5787d
commit 7b51feb89c
2 changed files with 8 additions and 2 deletions

View file

@ -155,9 +155,15 @@ class ShellDispatcher {
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('DS', DIRECTORY_SEPARATOR);
define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(__FILE__))));
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
define('DISABLE_DEFAULT_ERROR_HANDLING', false);
define('CAKEPHP_SHELL', true);
if (!defined('CORE_PATH')) {
if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
define('CORE_PATH', null);
} else {
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
}
}
}
require_once(CORE_PATH . 'cake' . DS . 'basics.php');
}

View file

@ -103,7 +103,7 @@ class ApiShellTest extends CakeTestCase {
$this->Shell->expects($this->at(2))->method('out')->with($expected);
$this->Shell->args = array('controller');
$this->Shell->paths['controller'] = LIBS . 'controller' . DS;
$this->Shell->paths['controller'] = CAKE_CORE_INCLUDE_PATH . DS . LIBS . 'controller' . DS;
$this->Shell->main();
}
}