Beispiel #1
0
 public function testWithAnyMethodCallsBefore()
 {
     $this->if($asserter = new asserters\adapter(new asserter\generator()))->then->array($asserter->getBeforeMethodCalls())->isEmpty()->object($asserter->withAnyMethodCallsBefore())->isIdenticalTo($asserter)->array($asserter->getBeforeMethodCalls())->isEmpty()->if($asserter->setWith($adapter = new test\adapter()))->and($asserter->beforeMethodCall(uniqid(), new \mock\dummy()))->then->array($asserter->getBeforeMethodCalls())->isNotEmpty()->object($asserter->withAnyMethodCallsBefore())->isIdenticalTo($asserter)->array($asserter->getBeforeMethodCalls())->isEmpty()->if($asserter->beforeMethodCall($method1 = uniqid(), new \mock\dummy())->beforeMethodCall($method2 = uniqid(), new \mock\dummy()))->then->array($asserter->getBeforeMethodCalls())->isNotEmpty()->object($asserter->withAnyMethodCallsBefore())->isIdenticalTo($asserter)->array($asserter->getBeforeMethodCalls())->isEmpty();
 }