Exemplo n.º 1
0
 /** @test */
 public function method_times_shouldCallWithIndex()
 {
     Fn\times(3, $spy = new Spy());
     $spy->shouldHaveBeenCalled()->with(0);
     $spy->shouldHaveBeenCalled()->with(1);
     $spy->shouldHaveBeenCalled()->with(2);
 }
Exemplo n.º 2
0
 /**
  * @test
  * @expectedException \Mockery\Exception\InvalidCountException
  */
 public function shouldHaveBeenCalled_shouldFailIfTheSpyWasCalled_withWrongArgs()
 {
     $spy = new Spy();
     $spy('foo');
     $spy->shouldHaveBeenCalled()->with('bar');
 }