Skip to content

Commit

Permalink
Fixing constant declaration as it was not consistent in web runner an…
Browse files Browse the repository at this point in the history
…d cli runner
  • Loading branch information
lorenzo committed Jul 8, 2010
1 parent fa8db57 commit 7b51feb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cake/console/cake.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,15 @@ function __initConstants() {
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');
}
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/console/libs/api.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testMethodNameDetection () {
$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();
}
}

0 comments on commit 7b51feb

Please sign in to comment.