public function testRegex2() { $expected = ['baby' => 'geza']; $route = new Route('/:baby', $this->matcher); $actual = $route->parameters('/geza'); $this->assertEquals($expected['baby'], $actual['baby']); }
public function handle(Route $route) { $factory = $this->factory($route->controller()); $controller = $factory->invoke(); $controller->context = $this->httpContext; $view = $this->view($controller, $this->action($route->action()), $route->parameters()); $view->context = $this->httpContext; $this->header($view); $this->render($view); }