PhpSpec\Wrapper\Subject\ExpectationFactory::decoratedExpectation PHP Method

decoratedExpectation() private method

private decoratedExpectation ( PhpSpec\Wrapper\Subject\Expectation\Expectation $expectation, PhpSpec\Matcher\Matcher $matcher ) : ConstructorDecorator
$expectation PhpSpec\Wrapper\Subject\Expectation\Expectation
$matcher PhpSpec\Matcher\Matcher
return PhpSpec\Wrapper\Subject\Expectation\ConstructorDecorator
    private function decoratedExpectation(Expectation $expectation, Matcher $matcher)
    {
        $dispatcherDecorator = new DispatcherDecorator($expectation, $this->dispatcher, $matcher, $this->example);
        $unwrapperDecorator = new UnwrapDecorator($dispatcherDecorator, new Unwrapper());
        $constructorDecorator = new ConstructorDecorator($unwrapperDecorator);
        return $constructorDecorator;
    }