Пример #1
0
 /**
  * @param RouteGroup $group
  */
 public function addGroup(RouteGroup $group)
 {
     $group->updateRoutes();
     foreach ($group->getRoutes() as $route) {
         $this->add($route);
     }
     $this->groups[] = $group;
     return $this;
 }
Пример #2
0
 public function it_can_find_group_by_route(Route $route, RouteGroup $group)
 {
     $route->getAction()->willReturn('FooController::test');
     $route->getVerb()->willReturn('GET');
     $route->getUrl()->willReturn('123/345');
     $group->getRoutes()->willReturn([$route]);
     $group->getUrlSegment()->willReturn(false);
     $group->includes($route)->willReturn(true);
     $group->updateRoutes()->willReturn(null);
     $group->addRoute($route);
     $this->addGroup($group);
     $this->findGroupByRoute($route)->shouldReturn($group);
 }