public function test__construct() { $invoker = new adapter\invoker(); $this->assert->boolean($invoker->isEmpty())->isTrue()->variable($invoker->getCurrentCall())->isNull(); }
public function testAtCall() { $this->if($invoker = new testedClass(uniqid()))->and($invoker->setClosure(function () use(&$defaultReturn) { return $defaultReturn = uniqid(); }, 0))->then->variable($invoker->getCurrentCall())->isNull()->object($invoker->atCall($call = rand(1, PHP_INT_MAX)))->isIdenticalTo($invoker)->integer($invoker->getCurrentCall())->isEqualTo($call); }