OrnoTest\Route\DispatcherTest::testUriStrategyRouteReturnsResponseWhenControllerDoes PHP Method

testUriStrategyRouteReturnsResponseWhenControllerDoes() public method

Assert that a route using the URI Strategy returns response when controller does
    public function testUriStrategyRouteReturnsResponseWhenControllerDoes()
    {
        $mockResponse = $this->getMock('Orno\\Http\\Response');
        $collection = new Route\RouteCollection();
        $collection->setStrategy(Route\RouteStrategyInterface::URI_STRATEGY);
        $collection->get('/route/{id}/{name}', function ($id, $name) use($mockResponse) {
            $this->assertEquals('2', $id);
            $this->assertEquals('phil', $name);
            return $mockResponse;
        });
        $dispatcher = $collection->getDispatcher();
        $response = $dispatcher->dispatch('GET', '/route/2/phil');
        $this->assertSame($mockResponse, $response);
    }