public function UrlMatcherTest::testMatchOverriddenRoute in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php \Symfony\Component\Routing\Tests\Matcher\UrlMatcherTest::testMatchOverriddenRoute()
File
- vendor/
symfony/ routing/ Tests/ Matcher/ UrlMatcherTest.php, line 184
Class
Namespace
Symfony\Component\Routing\Tests\MatcherCode
public function testMatchOverriddenRoute() {
$collection = new RouteCollection();
$collection
->add('foo', new Route('/foo'));
$collection1 = new RouteCollection();
$collection1
->add('foo', new Route('/foo1'));
$collection
->addCollection($collection1);
$matcher = new UrlMatcher($collection, new RequestContext());
$this
->assertEquals(array(
'_route' => 'foo',
), $matcher
->match('/foo1'));
$this
->setExpectedException('Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException');
$this
->assertEquals(array(), $matcher
->match('/foo'));
}