Esempio n. 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".');
     }
 }
Esempio n. 2
0
 private function applyRoutes(Router $router)
 {
     if ($options = realpath($this->path . '/' . $this->classConfig->routes)) {
         $router->import($options);
     }
 }