mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing constants being incorrect when calling cake console from the root of the source tree checkout.
This commit is contained in:
parent
a07094fd69
commit
a0660ffd9d
2 changed files with 14 additions and 15 deletions
|
@ -129,7 +129,6 @@ class ShellDispatcher {
|
|||
if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) {
|
||||
define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'tmp' . DS);
|
||||
}
|
||||
|
||||
$boot = file_exists(ROOT . DS . APP_DIR . DS . 'config' . DS . 'bootstrap.php');
|
||||
require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
|
||||
|
||||
|
@ -230,7 +229,7 @@ class ShellDispatcher {
|
|||
|
||||
$defaults = array(
|
||||
'app' => 'app',
|
||||
'root' => dirname(dirname(dirname(__FILE__))),
|
||||
'root' => dirname(dirname(dirname(dirname(__FILE__)))),
|
||||
'working' => null,
|
||||
'webroot' => 'webroot'
|
||||
);
|
||||
|
@ -323,4 +322,4 @@ class ShellDispatcher {
|
|||
protected function _stop($status = 0) {
|
||||
exit($status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,8 +154,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'app' => 'app',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'app'),
|
||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
||||
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
|
||||
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
|
||||
);
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
$Dispatcher->parseParams($params);
|
||||
|
@ -169,8 +169,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'app' => 'new',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
||||
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
|
||||
);
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
$Dispatcher->parseParams($params);
|
||||
|
@ -188,8 +188,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'app' => 'new',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
||||
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
|
||||
);
|
||||
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
|
@ -207,8 +207,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'app' => 'new',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH)
|
||||
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
|
||||
);
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
$Dispatcher->parseParams($params);
|
||||
|
@ -225,8 +225,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
);
|
||||
$expected = array(
|
||||
'app' => 'new',
|
||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
||||
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
|
||||
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
|
||||
'webroot' => 'webroot'
|
||||
);
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
|
@ -248,8 +248,8 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'app' => 'app',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH . DS . 'app'),
|
||||
'root' => str_replace('\\', '/', CAKE_CORE_INCLUDE_PATH),
|
||||
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
|
||||
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
|
||||
);
|
||||
$Dispatcher->params = $Dispatcher->args = array();
|
||||
$Dispatcher->parseParams($params);
|
||||
|
|
Loading…
Reference in a new issue