Esempio n. 1
0
 public function testGet()
 {
     $router = new RouteCollection();
     $router->get('/', 'handler');
     $routes = $router->getRoutes();
     $this->assertRoute('GET', '/', 'handler', [], reset($routes));
     $this->assertFalse(next($routes));
 }
Esempio n. 2
0
 /**
  * @param string $path
  * @param string|callable $handler
  * @return \Fastra\Route
  */
 public function get($path, $handler)
 {
     return $this->routeCollection->get($path, $handler);
 }