OrnoTest\Route\DispatcherTest::testUriStrategyRouteReceivesCorrectArguments PHP Méthode

testUriStrategyRouteReceivesCorrectArguments() public méthode

Assert that a route using the URI Strategy gets passed the correct arguments
    public function testUriStrategyRouteReceivesCorrectArguments()
    {
        $collection = new Route\RouteCollection();
        $collection->setStrategy(Route\RouteStrategyInterface::URI_STRATEGY);
        $collection->get('/route/{id}/{name}', function ($id, $name) {
            $this->assertEquals('2', $id);
            $this->assertEquals('phil', $name);
        });
        $dispatcher = $collection->getDispatcher();
        $response = $dispatcher->dispatch('GET', '/route/2/phil');
    }