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);
 }
Example #2
0
 /**
  * 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);
 }