/** * Records the invocation of the method. * * @param array $arguments * @param mixed $returnValue * @param \Exception $thrown * @throws \ReflectionException */ public function record($arguments, $returnValue, \Exception $thrown = null) { $this->history->add(new Call($this->named($arguments), $returnValue, $thrown)); if (!$this->checkReturnType) { return; } if ($thrown) { $this->checkException($thrown); } else { $this->checkReturnValue($returnValue); } }
function __construct(Stub $stub, $arguments) { parent::__construct([]); $this->stub = $stub; $this->arguments = $arguments; }