public function test_Should_FailToSave_When_ValidationFails() { $this->mockValidator->shouldReceive('with')->once()->andReturn($this->mockValidator); $this->mockValidator->shouldReceive('passes')->once()->andReturn(false); $form = new UserForm($this->mockValidator, $this->mockUserRepository); $result = $form->save([]); $this->assertFalse($result, 'Expected save to fail.'); }