コード例 #1
0
ファイル: mock.php プロジェクト: ronan-gloo/atoum
 public function testWithAnyFunctionCallsBefore()
 {
     $this->if($asserter = new asserters\mock($generator = new asserter\generator()))->then->array($asserter->getBeforeFunctionCalls())->isEmpty()->object($asserter->withAnyFunctionCallsBefore())->isIdenticalTo($asserter)->array($asserter->getBeforeFunctionCalls())->isEmpty()->if($asserter->setWith($mock = new \mock\mageekguy\atoum\tests\units\asserters\dummy()))->and($adapter = new test\adapter())->and($asserter->beforeFunctionCall($function = uniqid(), $adapter))->then->array($asserter->getBeforeFunctionCalls())->isNotEmpty()->object($asserter->withAnyFunctionCallsBefore())->isIdenticalTo($asserter)->array($asserter->getBeforeFunctionCalls())->isEmpty()->if($asserter->beforeFunctionCall($function1 = uniqid(), $adapter)->beforeFunctionCall($function2 = uniqid(), $adapter))->then->array($asserter->getBeforeFunctionCalls())->isNotEmpty()->object($asserter->withAnyFunctionCallsBefore())->isIdenticalTo($asserter)->array($asserter->getBeforeFunctionCalls())->isEmpty();
 }