예제 #1
0
 public function json()
 {
     $router = new Router();
     $router->import(__DIR__ . '/../../Provider/Router/routes.json');
     if (!$router->count()) {
         $this->assert(false, 'No routes were imported.');
     }
     foreach ($router as $name => $route) {
         $this->assert(is_callable($route), 'The route should be callable.');
         $this->assert($route instanceof Route, 'The route should be an instance of "Europa\\Router\\Route".');
     }
 }
예제 #2
0
파일: Module.php 프로젝트: devco/europaphp
 private function applyRoutes(Router $router)
 {
     if ($options = realpath($this->path . '/' . $this->classConfig->routes)) {
         $router->import($options);
     }
 }