mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing constant declaration as it was not consistent in web runner and cli runner
This commit is contained in:
parent
fa8db5787d
commit
7b51feb89c
2 changed files with 8 additions and 2 deletions
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue