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