File
- drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php, line 280
Class
- UrlMatcherTest
Namespace
Symfony\Component\Routing\Tests\Matcher
Code
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'));
}