diff --git a/cake/tests/cases/console/libs/acl.test.php b/cake/tests/cases/console/libs/acl.test.php index e604639d4f4..94869be495d 100644 --- a/cake/tests/cases/console/libs/acl.test.php +++ b/cake/tests/cases/console/libs/acl.test.php @@ -51,7 +51,7 @@ public function setUp() { $this->Dispatcher = $this->getMock( 'ShellDispatcher', - array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment', 'dispatch', 'clear') + array('_stop', '_initEnvironment', 'dispatch') ); $this->Task = $this->getMock( 'AclShell', diff --git a/cake/tests/cases/console/libs/api.test.php b/cake/tests/cases/console/libs/api.test.php index fbd54559b74..e4d5f5478c2 100644 --- a/cake/tests/cases/console/libs/api.test.php +++ b/cake/tests/cases/console/libs/api.test.php @@ -40,7 +40,7 @@ public function setUp() { parent::setUp(); $this->Dispatcher = $this->getMock( 'ShellDispatcher', - array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment', 'dispatch', 'clear') + array('_stop', '_initEnvironment', 'dispatch') ); $this->Shell = $this->getMock( 'ApiShell', diff --git a/cake/tests/cases/console/libs/bake.test.php b/cake/tests/cases/console/libs/bake.test.php index 3143f0ba444..acefbc732d5 100644 --- a/cake/tests/cases/console/libs/bake.test.php +++ b/cake/tests/cases/console/libs/bake.test.php @@ -52,7 +52,7 @@ public function setUp() { parent::setUp(); $this->Dispatcher = $this->getMock( 'ShellDispatcher', - array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment', 'clear') + array('_stop', '_initEnvironment') ); $this->Shell = $this->getMock( 'BakeShell', diff --git a/cake/tests/cases/console/libs/command_list.test.php b/cake/tests/cases/console/libs/command_list.test.php index 602226ccaa9..0572d761634 100644 --- a/cake/tests/cases/console/libs/command_list.test.php +++ b/cake/tests/cases/console/libs/command_list.test.php @@ -50,14 +50,15 @@ public function setUp() { $this->Dispatcher = $this->getMock( 'ShellDispatcher', - array('getInput', 'stderr', '_stop', '_initEnvironment', 'dispatch', 'clear') + array('_stop', '_initEnvironment', 'dispatch') ); - $this->Dispatcher->stdout = new TestStringOutput(); + $out = new TestStringOutput(); + $in = $this->getMock('ConsoleInput'); $this->Shell = $this->getMock( 'CommandListShell', - array('in', '_stop'), - array(&$this->Dispatcher) + array('in', '_stop', 'clear'), + array(&$this->Dispatcher, $out, null, $in) ); } @@ -77,7 +78,7 @@ function tearDown() { */ function testMain() { $this->Shell->main(); - $output = $this->Dispatcher->stdout->output; + $output = $this->Shell->stdout->output; $expected = "/example \[.*TestPlugin, TestPluginTwo.*\]/"; $this->assertPattern($expected, $output); diff --git a/cake/tests/cases/console/libs/testsuite.test.php b/cake/tests/cases/console/libs/testsuite.test.php index f29e50bc443..dfeac863430 100644 --- a/cake/tests/cases/console/libs/testsuite.test.php +++ b/cake/tests/cases/console/libs/testsuite.test.php @@ -34,11 +34,11 @@ class TestSuiteShellTest extends CakeTestCase { public function setUp() { $this->Dispatcher = $this->getMock( 'ShellDispatcher', - array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment', 'clear') + array('_stop', '_initEnvironment') ); $this->Shell = $this->getMock( 'TestSuiteShell', - array('in', 'out', 'hr', 'help', 'error', 'err', '_stop', 'initialize', 'run'), + array('in', 'out', 'hr', 'help', 'error', 'err', '_stop', 'initialize', 'run', 'clear'), array(&$this->Dispatcher) ); $this->Shell->Dispatch->shellPaths = App::path('shells');