public function testFailingRequirement() { $rule = $this->createRuleWithRequirements(); $result = $this->object->match('/post/my_action/year/2009/month/here-is-a-string', $rule, new Route()); $this->assertEquals(false, $result); }
/** * Handle request * * @param string $httpMethod * @param string $uri * @return mixed */ public function handle($httpMethod, $uri) { $matcher = new RouteMatcher($this->generator->getData(), $this->handler); $this->currentRoute = $route = $matcher->match($httpMethod, $uri); return $this->handler->handleRoute($route); }