OrnoTest\Route\DispatcherTest::testRequestResponseStrategyRouteReceivesCorrectArguments PHP Method

testRequestResponseStrategyRouteReceivesCorrectArguments() public method

Assert that a route using the Request -> Response Strategy gets passed the correct arguments
    public function testRequestResponseStrategyRouteReceivesCorrectArguments()
    {
        $collection = new Route\RouteCollection();
        $collection->setStrategy(Route\RouteStrategyInterface::REQUEST_RESPONSE_STRATEGY);
        $collection->get('/route', function (Request $request, Response $response) {
            $this->assertInstanceOf('Orno\\Http\\RequestInterface', $request);
            $this->assertInstanceOf('Orno\\Http\\ResponseInterface', $response);
            return $response;
        });
        $dispatcher = $collection->getDispatcher();
        $response = $dispatcher->dispatch('GET', '/route');
        $this->assertInstanceOf('Orno\\Http\\ResponseInterface', $response);
    }