diff --git a/cake/tests/cases/console/libs/acl.test.php b/cake/tests/cases/console/libs/acl.test.php index df4e337d8..f27a69436 100644 --- a/cake/tests/cases/console/libs/acl.test.php +++ b/cake/tests/cases/console/libs/acl.test.php @@ -86,7 +86,7 @@ class AclShellTest extends CakeTestCase { function startTest() { $this->Dispatcher =& new TestAclShellMockShellDispatcher(); $this->Task =& new MockAclShell($this->Dispatcher); - $this->Task->Dispatch = new $this->Dispatcher; + $this->Task->Dispatch =& $this->Dispatcher; $this->Task->params['datasource'] = 'test_suite'; } diff --git a/cake/tests/cases/console/libs/api.test.php b/cake/tests/cases/console/libs/api.test.php index dbaa34fa6..b5568fce7 100644 --- a/cake/tests/cases/console/libs/api.test.php +++ b/cake/tests/cases/console/libs/api.test.php @@ -64,7 +64,7 @@ class ApiShellTest extends CakeTestCase { function startTest() { $this->Dispatcher =& new ApiShellMockShellDispatcher(); $this->Shell =& new MockApiShell($this->Dispatcher); - $this->Shell->Dispatch = new $this->Dispatcher; + $this->Shell->Dispatch =& $this->Dispatcher; } /** * tearDown method @@ -107,7 +107,7 @@ class ApiShellTest extends CakeTestCase { ) ); $this->Shell->expectAt(1, 'out', $expected); - + $this->Shell->args = array('controller'); $this->Shell->paths['controller'] = CAKE_CORE_INCLUDE_PATH . DS . LIBS . 'controller' . DS; $this->Shell->main(); diff --git a/cake/tests/cases/console/libs/shell.test.php b/cake/tests/cases/console/libs/shell.test.php index bfd15a95b..b832088e5 100644 --- a/cake/tests/cases/console/libs/shell.test.php +++ b/cake/tests/cases/console/libs/shell.test.php @@ -37,10 +37,9 @@ if (!class_exists('ShellDispatcher')) { ob_end_clean(); } -Mock::generatePartial( - 'ShellDispatcher', 'TestShellMockShellDispatcher', - array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment') - ); +Mock::generatePartial('ShellDispatcher', 'TestShellMockShellDispatcher', array( + 'getInput', 'stdout', 'stderr', '_stop', '_initEnvironment' +)); /** * TestShell class * @@ -48,6 +47,13 @@ Mock::generatePartial( * @subpackage cake.tests.cases.console.libs */ class TestShell extends Shell { +/** + * Fixtures used in this test case + * + * @var name + * @access public + */ + var $name = 'TestShell'; } /** * TestAppleTask class diff --git a/cake/tests/cases/console/libs/tasks/test.test.php b/cake/tests/cases/console/libs/tasks/test.test.php index c8835cfcb..548f29606 100644 --- a/cake/tests/cases/console/libs/tasks/test.test.php +++ b/cake/tests/cases/console/libs/tasks/test.test.php @@ -65,7 +65,7 @@ class TestTaskTest extends CakeTestCase { function setUp() { $this->Dispatcher =& new TestTestTaskMockShellDispatcher(); $this->Task =& new MockTestTask($this->Dispatcher); - $this->Task->Dispatch = new $this->Dispatcher; + $this->Task->Dispatch =& $this->Dispatcher; } /** * tearDown method