OrnoTest\Route\DispatcherTest::testDispatcherHandles404CorrectlyOnRestfulStrategy PHP Method

testDispatcherHandles404CorrectlyOnRestfulStrategy() public method

Asserts that a 404 response is returned whilst using restful strategy
    public function testDispatcherHandles404CorrectlyOnRestfulStrategy()
    {
        $collection = new Route\RouteCollection();
        $collection->setStrategy(Route\RouteStrategyInterface::RESTFUL_STRATEGY);
        $dispatcher = $collection->getDispatcher();
        $response = $dispatcher->dispatch('GET', '/route');
        $this->assertInstanceOf('Orno\\Http\\JsonResponse', $response);
        $this->assertSame('{"status_code":404,"message":"Not Found"}', $response->getContent());
        $this->assertSame(404, $response->getStatusCode());
    }