protected function _get_valid_callback_stream_xxx($argument, $method) { $this->given($stream = new \Mock\Hoa\Stream\IStream\Out(), $arguments = [$argument], $xcallable = new SUT($stream))->when($result = $xcallable->getValidCallback($arguments))->then->array($result)->isEqualTo([$stream, $method]); }
/** * Memoization algorithm. * * @param ... ... Arguments. * @return mixed */ public function __invoke() { $arguments = func_get_args(); $id = md5(serialize($arguments)); if (!isset($this->_arguments[$id])) { $this->_arguments[$id] = $this->_callable->distributeArguments($arguments); } return $this->_arguments[$id]; }