/** * @expectedException Felipecwb\Routing\Exception\RouteNotFoundException */ public function testMatchNotExistsRoute() { $collection = new RouteCollection(); $matcher = new Matcher($collection); $matcher->match('/not-found'); // throw an RouteNotFoundException }
/** * Match a Route * @param string $path String to be matched by pattern * @throws RouteNotFoundException * @return Route */ public function match($path) { return $this->matcher->match($path); }