Exemplo n.º 1
0
 /**
  *
  */
 public function testNestedGroup()
 {
     $routes = new Routes();
     $routes->group(['prefix' => 'baz'], function ($routes) {
         $routes->group(['prefix' => 'bax'], function ($routes) {
             $routes->get('/foo', 'FooController::fooAction');
             $routes->get('/bar', 'FooController::barAction');
         });
     });
     $routes = $routes->getRoutes();
     $this->assertEquals('/baz/bax/foo', $routes[0]->getRoute());
     $this->assertEquals('/baz/bax/bar', $routes[1]->getRoute());
 }