save() 공개 메소드

Create a new recipe.
public save ( array $input ) : boolean
$input array Data to create a recipe
리턴 boolean
예제 #1
0
 public function test_Should_FailToSave_When_ValidationFails()
 {
     $this->mockValidator->shouldReceive('with')->once()->andReturn($this->mockValidator);
     $this->mockValidator->shouldReceive('passes')->once()->andReturn(false);
     $form = new RecipeForm($this->mockValidator, $this->mockRecipeRepository);
     $result = $form->save([]);
     $this->assertFalse($result, 'Expected save to fail.');
 }