diff --git a/lib/Cake/Test/TestCase/Console/Command/BakeShellTest.php b/lib/Cake/Test/TestCase/Console/Command/BakeShellTest.php index d4510ad35dd..5752e4bf4ec 100644 --- a/lib/Cake/Test/TestCase/Console/Command/BakeShellTest.php +++ b/lib/Cake/Test/TestCase/Console/Command/BakeShellTest.php @@ -64,25 +64,27 @@ public function tearDown() { * @return void */ public function testAllWithModelName() { + $dispatcher =& $this->Dispatcher; + $this->Shell->Model = $this->getMock( 'Cake\Console\Command\Task\ModelTask', [], - [$this->Dispatcher] + [$dispatcher] ); $this->Shell->Controller = $this->getMock( 'Cake\Console\Command\Task\ControllerTask', [], - [$this->Dispatcher] + [$dispatcher] ); $this->Shell->View = $this->getMock( 'Cake\Console\Command\Task\ModelTask', [], - [$this->Dispatcher] + [$dispatcher] ); $this->Shell->DbConfig = $this->getMock( 'Cake\Console\Command\Task\DbConfigTask', [], - [$this->Dispatcher] + [$dispatcher] ); $this->Shell->DbConfig->expects($this->once())