public function testMatchRegression() {
$coll = new RouteCollection();
$coll
->add('foo', new Route('/foo/{foo}'));
$coll
->add('bar', new Route('/foo/bar/{foo}'));
$matcher = new UrlMatcher($coll, new RequestContext());
$this
->assertEquals(array(
'foo' => 'bar',
'_route' => 'bar',
), $matcher
->match('/foo/bar/bar'));
$collection = new RouteCollection();
$collection
->add('foo', new Route('/{bar}'));
$matcher = new UrlMatcher($collection, new RequestContext());
try {
$matcher
->match('/');
$this
->fail();
} catch (ResourceNotFoundException $e) {
}
}