public function testUnsetClosure() { $this->if($invoker = new testedClass(uniqid()))->then->exception(function () use($invoker) { $invoker->unsetClosure(-rand(1, PHP_INT_MAX), function () { }); })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic\\invalidArgument')->hasMessage('Call number must be greater than or equal to zero')->exception(function () use($invoker, &$call) { $invoker->unsetClosure($call = rand(0, PHP_INT_MAX), function () { }); })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic\\invalidArgument')->hasMessage('There is no closure defined for call ' . $call)->if($invoker->setClosure(function () { }))->then->boolean($invoker->closureIsSetForCall())->isTrue()->object($invoker->unsetClosure())->isIdenticalTo($invoker)->boolean($invoker->closureIsSetForCall())->isFalse(); }