Exemple #1
0
 public function testWithAnyMethodCallsAfter()
 {
     $this->if($asserter = new asserters\adapter(new asserter\generator()))->then->array($asserter->getAfterMethodCalls())->isEmpty()->object($asserter->withAnyMethodCallsAfter())->isIdenticalTo($asserter)->array($asserter->getAfterMethodCalls())->isEmpty()->if($asserter->setWith($adapter = new test\adapter()))->and($asserter->afterMethodCall(uniqid(), new \mock\dummy()))->then->array($asserter->getAfterMethodCalls())->isNotEmpty()->object($asserter->withAnyMethodCallsAfter())->isIdenticalTo($asserter)->array($asserter->getAfterMethodCalls())->isEmpty()->if($asserter->afterMethodCall($method1 = uniqid(), new \mock\dummy())->afterMethodCall($method2 = uniqid(), new \mock\dummy()))->then->array($asserter->getAfterMethodCalls())->isNotEmpty()->object($asserter->withAnyMethodCallsAfter())->isIdenticalTo($asserter)->array($asserter->getAfterMethodCalls())->isEmpty();
 }