/** * @test * @expectedException \InvalidArgumentException */ public function method_times_shouldHandleNegativeArg() { Fn\times(-1, $spy = new Spy()); $spy->shouldNotHaveBeenCalled(); }
/** * @test * @expectedException \Mockery\Exception\InvalidCountException */ public function shouldNotHaveBeenCalled_shouldFailIfSpyWasCalled() { $spy = new Spy(); $spy(); $spy->shouldNotHaveBeenCalled(); }