public function testRestfulStrategyRouteReturnsResponseWhenControllerDoes()
{
$mockResponse = $this->getMock('Orno\\Http\\JsonResponse');
$collection = new Route\RouteCollection();
$collection->setStrategy(Route\RouteStrategyInterface::RESTFUL_STRATEGY);
$collection->get('/route/{id}/{name}', function (Request $request) use($mockResponse) {
$this->assertInstanceOf('Orno\\Http\\RequestInterface', $request);
return $mockResponse;
});
$dispatcher = $collection->getDispatcher();
$response = $dispatcher->dispatch('GET', '/route/2/phil');
$this->assertSame($mockResponse, $response);
}