diff --git a/cake/console/shells/bake.php b/cake/console/shells/bake.php index 1ee707cc407..5e934b351bc 100644 --- a/cake/console/shells/bake.php +++ b/cake/console/shells/bake.php @@ -60,7 +60,7 @@ public function startup() { public function main() { if (!is_dir($this->DbConfig->path)) { if ($this->Project->execute()) { - $this->DbConfig->path = $this->params['working'] . DS . 'config' . DS; + $this->DbConfig->path = APP_PATH . DS . 'config' . DS; } else { return false; } diff --git a/cake/console/shells/shell.php b/cake/console/shells/shell.php index d47e4ed3b58..cdecaeef0ec 100644 --- a/cake/console/shells/shell.php +++ b/cake/console/shells/shell.php @@ -205,8 +205,8 @@ protected function _welcome() { $this->out(); $this->out('Welcome to CakePHP v' . Configure::version() . ' Console'); $this->hr(); - $this->out('App : '. $this->Dispatch->params['app']); - $this->out('Path: '. $this->Dispatch->params['working']); + $this->out('App : '. APP_DIR); + $this->out('Path: '. APP_PATH); $this->hr(); } diff --git a/cake/console/shells/tasks/db_config.php b/cake/console/shells/tasks/db_config.php index 8d15a953e62..1e9dc6bbce6 100644 --- a/cake/console/shells/tasks/db_config.php +++ b/cake/console/shells/tasks/db_config.php @@ -60,7 +60,7 @@ class DbConfigTask extends Shell { * @var string */ public function initialize() { - $this->path = $this->Dispatch->params['working'] . DS . 'config' . DS; + $this->path = APP_PATH . 'config' . DS; } /** diff --git a/cake/console/shells/tasks/extract.php b/cake/console/shells/tasks/extract.php index 713ae299b28..c6e43931306 100644 --- a/cake/console/shells/tasks/extract.php +++ b/cake/console/shells/tasks/extract.php @@ -103,7 +103,7 @@ function execute() { if (isset($this->params['paths'])) { $this->__paths = explode(',', $this->params['paths']); } else { - $defaultPath = $this->Dispatch->params['working']; + $defaultPath = APP_PATH; $message = sprintf(__("What is the full path you would like to extract?\nExample: %s\n[Q]uit [D]one"), $this->Dispatch->params['root'] . DS . 'myapp'); while (true) { $response = $this->in($message, null, $defaultPath); diff --git a/cake/console/shells/tasks/fixture.php b/cake/console/shells/tasks/fixture.php index c8062b1fc43..d24d5db85ec 100644 --- a/cake/console/shells/tasks/fixture.php +++ b/cake/console/shells/tasks/fixture.php @@ -56,7 +56,7 @@ class FixtureTask extends BakeTask { */ public function __construct(&$dispatch, $stdout = null, $stderr = null, $stdin = null) { parent::__construct($dispatch, $stdout, $stderr, $stdin); - $this->path = $this->Dispatch->params['working'] . DS . 'tests' . DS . 'fixtures' . DS; + $this->path = APP_PATH . 'tests' . DS . 'fixtures' . DS; } /** diff --git a/cake/tests/cases/console/shells/tasks/db_config.test.php b/cake/tests/cases/console/shells/tasks/db_config.test.php index 3abbadfd91d..c29e4b72cdc 100644 --- a/cake/tests/cases/console/shells/tasks/db_config.test.php +++ b/cake/tests/cases/console/shells/tasks/db_config.test.php @@ -69,7 +69,7 @@ public function setUp() { array(&$this->Dispatcher, $out, $out, $in) ); - $this->Task->params['working'] = rtrim(APP, DS); + $this->Task->path = APP . 'config' . DS; $this->Task->databaseClassName = 'TEST_DATABASE_CONFIG'; } @@ -100,7 +100,6 @@ public function testGetConfig() { * @return void */ public function testInitialize() { - $this->assertTrue(empty($this->Task->path)); $this->Task->initialize(); $this->assertFalse(empty($this->Task->path)); $this->assertEqual($this->Task->path, APP . 'config' . DS); diff --git a/cake/tests/cases/console/shells/tasks/fixture.test.php b/cake/tests/cases/console/shells/tasks/fixture.test.php index b52f5ff9483..42716af1e8d 100644 --- a/cake/tests/cases/console/shells/tasks/fixture.test.php +++ b/cake/tests/cases/console/shells/tasks/fixture.test.php @@ -85,11 +85,8 @@ public function testConstruct() { $out = $this->getMock('ConsoleOutput', array(), array(), '', false); $in = $this->getMock('ConsoleInput', array(), array(), '', false); - $this->Dispatcher->params['working'] = DS . 'my' . DS . 'path'; $Task = new FixtureTask($this->Dispatcher, $out, $out, $in); - - $expected = DS . 'my' . DS . 'path' . DS . 'tests' . DS . 'fixtures' . DS; - $this->assertEqual($Task->path, $expected); + $this->assertEqual($Task->path, APP . 'tests' . DS . 'fixtures' . DS); } /**