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