public function getCalls($method = null, array $arguments = null, $identical = false) { if ($method !== null) { $this->checkMethod($method); } return parent::getCalls($method, $arguments, $identical); }
public function testReset() { $this->if($adapter = new testedClass())->then->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls())->isEmpty()->object($adapter->reset())->isIdenticalTo($adapter)->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls())->isEmpty()->if($adapter->md5(uniqid()))->then->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls())->isNotEmpty()->object($adapter->reset())->isIdenticalTo($adapter)->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls())->isEmpty()->if($adapter->md5 = uniqid())->then->array($adapter->getInvokers())->isNotEmpty()->array($adapter->getCalls())->isEmpty()->object($adapter->reset())->isIdenticalTo($adapter)->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls())->isEmpty()->if($adapter->md5 = uniqid())->and($adapter->md5(uniqid()))->then->array($adapter->getInvokers())->isNotEmpty()->array($adapter->getCalls())->isNotEmpty()->object($adapter->reset())->isIdenticalTo($adapter)->array($adapter->getInvokers())->isEmpty()->array($adapter->getCalls())->isEmpty(); }
public function getCalls(test\adapter\call $call = null, $identical = false) { if ($call !== null) { $this->checkMethod($call->getFunction()); } return parent::getCalls($call, $identical); }
public function testReset() { $this->if($asserter = new asserters\adapter(new asserter\generator()))->then->variable($asserter->getAdapter())->isNull()->object($asserter->reset())->isIdenticalTo($asserter)->variable($asserter->getAdapter())->isNull()->if($asserter->setWith($adapter = new atoum\test\adapter()))->then->object($asserter->getAdapter())->isIdenticalTo($adapter)->array($adapter->getCalls())->isEmpty()->object($asserter->reset())->isIdenticalTo($asserter)->object($asserter->getAdapter())->isIdenticalTo($adapter)->array($adapter->getCalls())->isEmpty()->if($adapter->md5(uniqid()))->then->object($asserter->getAdapter())->isIdenticalTo($adapter)->array($adapter->getCalls())->isNotEmpty()->object($asserter->reset())->isIdenticalTo($asserter)->object($asserter->getAdapter())->isIdenticalTo($adapter)->array($adapter->getCalls())->isEmpty(); }
public function testReset() { $this->if($this->newTestedInstance(new asserter\generator()))->then->variable($this->testedInstance->getAdapter())->isNull()->object($this->testedInstance->reset())->isTestedInstance->variable($this->testedInstance->getAdapter())->isNull()->if($this->testedInstance->setWith($adapter = new atoum\test\adapter()))->then->object($this->testedInstance->getAdapter())->isIdenticalTo($adapter)->sizeOf($adapter->getCalls())->isZero()->object($this->testedInstance->reset())->isTestedInstance->object($this->testedInstance->getAdapter())->isIdenticalTo($adapter)->sizeOf($adapter->getCalls())->isZero()->if($adapter->md5(uniqid()))->then->object($this->testedInstance->getAdapter())->isIdenticalTo($adapter)->sizeOf($adapter->getCalls())->isEqualTo(1)->object($this->testedInstance->reset())->isTestedInstance->object($this->testedInstance->getAdapter())->isIdenticalTo($adapter)->sizeOf($adapter->getCalls())->isZero(); }