Exemplo n.º 1
0
 public function testGetLastCall()
 {
     $this->if($call = new call\mock(new asserters\adapter(new asserter\generator()), $mock = new \mock\dummy(), 'foo'))->then->variable($call->getLastCall())->isNull()->when(function () {
         $otherMock = new \mock\dummy();
         $otherMock->foo();
     })->variable($call->getLastCall())->isNull()->when(function () use($mock) {
         $mock->foo();
     })->integer($call->getLastCall())->isEqualTo(2)->when(function () use($mock) {
         $mock->foo();
     })->integer($call->getLastCall())->isEqualTo(3);
 }