public function testNamedRoutes() { $routes = new RouteCollection(new HttpMessageStrategy()); $routes->addRoute('GET', '/user/{id}', function () { })->setName('UserProfile'); $builder = new UrlBuilder(ServerRequestFactory::fromGlobals($this->fakeServerParams()), $routes); $this->assertEquals('/site/user/23', $builder->createByName('UserProfile', ['id' => 23])); }
public function createGroup($prefix = null, $suffix = null, $host = null, $scheme = null) { return $this->routes->addGroup($prefix, $suffix, $host, $scheme); }