save() public method

Create a new deployment.
public save ( array $input ) : boolean
$input array Data to create a deployment
return boolean
コード例 #1
0
ファイル: DeploymentFormTest.php プロジェクト: ngmy/webloyer
 public function test_Should_FailToSave_When_ValidationFails()
 {
     $this->mockValidator->shouldReceive('with')->once()->andReturn($this->mockValidator);
     $this->mockValidator->shouldReceive('passes')->once()->andReturn(false);
     $form = new DeploymentForm($this->mockValidator, $this->mockProjectRepository, $this->mockDeployCommander);
     $result = $form->save([]);
     $this->assertFalse($result, 'Expected save to fail.');
 }