/** * {@inheritdoc} * * @see \mageekguy\atoum\asserter::__call() */ public function __call($method, $arguments) { switch ($method) { case 'with': return $this->callIsSet(); case 'arguments': if (sizeof($arguments) < 2 || !\is_callable($arguments[1])) { throw new \Exception('arguments asserted require a int for the argument 0 and a callable function as 2 argument'); } $currentCall = $this->getCall(); $asserter = []; foreach ($this->getCalls($currentCall)->getEqualTo($currentCall)->toArray() as $call) { $asserter = $call->getArguments(); break; } $argument = $asserter[$arguments[0]]; $arguments[1]($argument); return $this->callIsSet(); default: return parent::__call($method, $arguments); } }