|
|
@@ -83,21 +83,38 @@ class BakeShellTest extends CakeTestCase {
|
|
|
$this->Shell->View = $this->getMock('ModelTask', array(), array(&$this->Dispatcher));
|
|
|
$this->Shell->DbConfig = $this->getMock('DbConfigTask', array(), array(&$this->Dispatcher));
|
|
|
|
|
|
- $this->Shell->DbConfig->expects($this->once())->method('getConfig')->will($this->returnValue('test'));
|
|
|
+ $this->Shell->DbConfig->expects($this->once())
|
|
|
+ ->method('getConfig')
|
|
|
+ ->will($this->returnValue('test'));
|
|
|
|
|
|
- $this->Shell->Model->expects($this->never())->method('getName');
|
|
|
- $this->Shell->Model->expects($this->once())->method('bake')->will($this->returnValue(true));
|
|
|
+ $this->Shell->Model->expects($this->never())
|
|
|
+ ->method('getName');
|
|
|
+
|
|
|
+ $this->Shell->Model->expects($this->once())
|
|
|
+ ->method('bake')
|
|
|
+ ->will($this->returnValue(true));
|
|
|
|
|
|
- $this->Shell->Controller->expects($this->once())->method('bake')->will($this->returnValue(true));
|
|
|
- $this->Shell->View->expects($this->once())->method('execute');
|
|
|
+ $this->Shell->Controller->expects($this->once())
|
|
|
+ ->method('bake')
|
|
|
+ ->will($this->returnValue(true));
|
|
|
+
|
|
|
+ $this->Shell->View->expects($this->once())
|
|
|
+ ->method('execute');
|
|
|
|
|
|
$this->Shell->expects($this->once())->method('_stop');
|
|
|
- $this->Shell->expects($this->at(0))->method('out')->with('Bake All');
|
|
|
- $this->Shell->expects($this->at(5))->method('out')->with('<success>Bake All complete</success>');
|
|
|
+ $this->Shell->expects($this->at(0))
|
|
|
+ ->method('out')
|
|
|
+ ->with('Bake All');
|
|
|
+
|
|
|
+ $this->Shell->expects($this->at(5))
|
|
|
+ ->method('out')
|
|
|
+ ->with('<success>Bake All complete</success>');
|
|
|
|
|
|
$this->Shell->connection = '';
|
|
|
$this->Shell->params = array();
|
|
|
$this->Shell->args = array('User');
|
|
|
$this->Shell->all();
|
|
|
+
|
|
|
+ $this->assertEquals('User', $this->Shell->View->args[0]);
|
|
|
}
|
|
|
}
|