PHPSpec2\Subject\LazyMethod::getInstance PHP Method

getInstance() public method

public getInstance ( )
    public function getInstance()
    {
        $instance = parent::getInstance();
        if (!method_exists($instance, $this->method) && !method_exists($instance, '__call')) {
            throw new MethodNotFoundException($instance, $this->method);
        }
        return call_user_func_array(array($instance, $this->method), $this->arguments);
    }