public function UrlMatcherTest::testDefaultRequirementOfVariable 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::testDefaultRequirementOfVariable()
File
- vendor/
symfony/ routing/ Tests/ Matcher/ UrlMatcherTest.php, line 282
Class
Namespace
Symfony\Component\Routing\Tests\MatcherCode
public function testDefaultRequirementOfVariable() {
$coll = new RouteCollection();
$coll
->add('test', new Route('/{page}.{_format}'));
$matcher = new UrlMatcher($coll, new RequestContext());
$this
->assertEquals(array(
'page' => 'index',
'_format' => 'mobile.html',
'_route' => 'test',
), $matcher
->match('/index.mobile.html'));
}