public function UrlGeneratorTest::testDefaultRequirementOfVariable

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php, line 368

Class

UrlGeneratorTest

Namespace

Symfony\Component\Routing\Tests\Generator

Code

public function testDefaultRequirementOfVariable() {
  $routes = $this
    ->getRoutes('test', new Route('/{page}.{_format}'));
  $generator = $this
    ->getGenerator($routes);
  $this
    ->assertSame('/app.php/index.mobile.html', $generator
    ->generate('test', array(
    'page' => 'index',
    '_format' => 'mobile.html',
  )));
}