ZendTest\Stratigility\Middleware\CallableMiddlewareWrapperTest::testWrapperDecoratesAndProxiesToCallableMiddleware PHP Method

testWrapperDecoratesAndProxiesToCallableMiddleware() public method

    public function testWrapperDecoratesAndProxiesToCallableMiddleware()
    {
        $request = $this->prophesize(ServerRequestInterface::class)->reveal();
        $delegate = $this->prophesize(DelegateInterface::class)->reveal();
        $response = $this->prophesize(ResponseInterface::class)->reveal();
        $decorator = new CallableMiddlewareWrapper(function ($request, $response, $delegate) {
            return $response;
        }, $response);
        $this->assertSame($response, $decorator->process($request, $delegate));
    }