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