public function match($path) { $data = RouteParser::parse($this->pattern, trim($path, '/'), $this->defaults, $this->constraints); if (!$data) { return null; } return new RouteMatch($this, $data); }
public function testParseUrlWithUnclosedGroup() { $this->setExpectedException('RuntimeException', 'Invalid route: a grouping was not closed'); $url = '{foo'; RouteParser::parse($url, 'foo', array(), array()); }