spec\PHPSpec2\Matcher\ThrowMatcher::let PHP Method

let() public method

public let ( PHPSpec2\Wrapper\ArgumentsUnwrapper $unwrapper, PHPSpec2\Formatter\Presenter\PresenterInterface $presenter )
$unwrapper PHPSpec2\Wrapper\ArgumentsUnwrapper
$presenter PHPSpec2\Formatter\Presenter\PresenterInterface
    function let($unwrapper, $presenter)
    {
        $unwrapper->unwrapAll(ANY_ARGUMENTS)->willReturnUsing(function ($arguments) {
            if (!is_array($arguments[0])) {
                $arguments[0] = $arguments[0]->getWrappedSubject();
            }
            return $arguments;
        });
        $presenter->presentValue(ANY_ARGUMENTS)->willReturn('val1');
        $presenter->presentValue(ANY_ARGUMENTS)->willReturn('val2');
        $this->beConstructedWith($unwrapper, $presenter);
    }