Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating Shell and Bake tasks to use App::path() instead of Configure…

…::read().
  • Loading branch information...
commit dc981840860d3fa706c2f4dea4bd8a101b4953e6 1 parent 5c9b5fe
@markstory markstory authored
View
2  cake/console/libs/shell.php
@@ -589,7 +589,7 @@ function _pluralHumanName($name) {
* @return string $path path to the correct plugin.
**/
function _pluginPath($pluginName) {
- $pluginPaths = Configure::read('pluginPaths');
+ $pluginPaths = App::path('plugins');
$pluginDirName = Inflector::underscore($pluginName);
foreach ($pluginPaths as $path) {
if (is_dir($path . $pluginDirName)) {
View
2  cake/console/libs/tasks/fixture.php
@@ -65,7 +65,7 @@ function __construct(&$dispatch) {
parent::__construct($dispatch);
$this->path = $this->params['working'] . DS . 'tests' . DS . 'fixtures' . DS;
if (!class_exists('CakeSchema')) {
- App::import('Model', 'Schema');
+ App::import('Model', 'CakeSchema');
}
}
/**
View
1  cake/console/libs/tasks/template.php
@@ -184,6 +184,7 @@ function _findTemplate($path, $directory, $filename) {
}
}
$this->err(sprintf(__('Could not find template for %s', true), $filename));
+ $this->_stop();
return false;
}
View
3  cake/tests/cases/console/libs/tasks/controller.test.php
@@ -99,8 +99,9 @@ function startTest() {
$this->Dispatcher =& new TestControllerTaskMockShellDispatcher();
$this->Task =& new MockControllerTask($this->Dispatcher);
$this->Task->Dispatch =& new $this->Dispatcher;
- $this->Task->Dispatch->shellPaths = Configure::read('shellPaths');
+ $this->Task->Dispatch->shellPaths = App::path('shells');
$this->Task->Template =& new TemplateTask($this->Task->Dispatch);
+ $this->Task->Template->params['theme'] = 'default';
$this->Task->Model =& new ControllerMockModelTask($this->Task->Dispatch);
$this->Task->Project =& new ControllerMockProjectTask($this->Task->Dispatch);
}
View
3  cake/tests/cases/console/libs/tasks/db_config.test.php
@@ -85,8 +85,7 @@ function startTest() {
$this->Dispatcher =& new TestDbConfigTaskMockShellDispatcher();
$this->Task =& new MockDbConfigTask($this->Dispatcher);
$this->Task->Dispatch =& new $this->Dispatcher;
- $this->Task->Dispatch->shellPaths = Configure::read('shellPaths');
- //$this->Task->Template =& new TemplateTask($this->Task->Dispatch);
+ $this->Task->Dispatch->shellPaths = App::path('shells');
$this->Task->params['working'] = rtrim(APP, '/');
$this->Task->databaseClassName = 'TEST_DATABASE_CONFIG';
View
2  cake/tests/cases/console/libs/tasks/fixture.test.php
@@ -74,7 +74,7 @@ function startTest() {
$this->Task->Model =& new MockFixtureModelTask();
$this->Task->Dispatch = new $this->Dispatcher;
$this->Task->Template =& new TemplateTask($this->Task->Dispatch);
- $this->Task->Dispatch->shellPaths = Configure::read('shellPaths');
+ $this->Task->Dispatch->shellPaths = App::path('shells');
$this->Task->Template->initialize();
}
/**
View
2  cake/tests/cases/console/libs/tasks/model.test.php
@@ -83,7 +83,7 @@ function startTest() {
$this->Dispatcher =& new TestModelTaskMockShellDispatcher();
$this->Task =& new MockModelTask($this->Dispatcher);
$this->Task->Dispatch =& new $this->Dispatcher;
- $this->Task->Dispatch->shellPaths = Configure::read('shellPaths');
+ $this->Task->Dispatch->shellPaths = App::path('shells');
$this->Task->Template =& new TemplateTask($this->Task->Dispatch);
$this->Task->Fixture =& new MockModelTaskFixtureTask();
$this->Task->Test =& new MockModelTaskFixtureTask();
View
2  cake/tests/cases/console/libs/tasks/plugin.test.php
@@ -66,7 +66,7 @@ class PluginTaskTest extends CakeTestCase {
*/
function startTest() {
$this->Dispatcher =& new TestPluginTaskMockShellDispatcher();
- $this->Dispatcher->shellPaths = Configure::read('shellPaths');
+ $this->Dispatcher->shellPaths = App::path('shells');
$this->Task =& new MockPluginTask($this->Dispatcher);
$this->Task->Dispatch =& $this->Dispatcher;
$this->Task->path = TMP . 'tests' . DS;
View
2  cake/tests/cases/console/libs/tasks/project.test.php
@@ -62,7 +62,7 @@ class ProjectTaskTest extends CakeTestCase {
*/
function startTest() {
$this->Dispatcher =& new TestProjectTaskMockShellDispatcher();
- $this->Dispatcher->shellPaths = Configure::read('shellPaths');
+ $this->Dispatcher->shellPaths = App::path('shells');
$this->Task =& new MockProjectTask($this->Dispatcher);
$this->Task->Dispatch =& $this->Dispatcher;
$this->Task->path = TMP . 'tests' . DS;
View
2  cake/tests/cases/console/libs/tasks/template.test.php
@@ -62,7 +62,7 @@ function startTest() {
$this->Dispatcher =& new TestTemplateTaskMockShellDispatcher();
$this->Task =& new MockTemplateTask($this->Dispatcher);
$this->Task->Dispatch = new $this->Dispatcher;
- $this->Task->Dispatch->shellPaths = Configure::read('shellPaths');
+ $this->Task->Dispatch->shellPaths = App::path('shells');
}
/**
View
2  cake/tests/cases/console/libs/tasks/test.test.php
@@ -133,7 +133,7 @@ class TestTaskTest extends CakeTestCase {
*/
function startTest() {
$this->Dispatcher =& new TestTestTaskMockShellDispatcher();
- $this->Dispatcher->shellPaths = Configure::read('shellPaths');
+ $this->Dispatcher->shellPaths = App::path('shells');
$this->Task =& new MockTestTask($this->Dispatcher);
$this->Task->Dispatch =& $this->Dispatcher;
$this->Task->Template =& new TemplateTask($this->Dispatcher);
View
2  cake/tests/cases/console/libs/tasks/view.test.php
@@ -103,7 +103,7 @@ class ViewTaskTest extends CakeTestCase {
*/
function startTest() {
$this->Dispatcher =& new TestViewTaskMockShellDispatcher();
- $this->Dispatcher->shellPaths = Configure::read('shellPaths');
+ $this->Dispatcher->shellPaths = App::path('shells');
$this->Task =& new MockViewTask($this->Dispatcher);
$this->Task->Dispatch =& $this->Dispatcher;
$this->Task->Template =& new TemplateTask($this->Dispatcher);
Please sign in to comment.
Something went wrong with that request. Please try again.