Create a route group with shared attributes. Overloading this method allows
developers to chain requirements and filters to all routes within the
group.
public function testOrderOfRoutesIsMaintainted() { $router = new Router(); $router->group(array('prefix' => 'foo'), function () use($router) { $router->get('bar', function () { }); }); $router->get('baz', function () { }); $routes = array_keys($router->getRoutes()->all()); $this->assertEquals(array('get foo/bar', 'get baz'), $routes); }