public function UrlGeneratorTest::testNotPassedOptionalParameterInBetween

File

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

Class

UrlGeneratorTest

Namespace

Symfony\Component\Routing\Tests\Generator

Code

public function testNotPassedOptionalParameterInBetween() {
  $routes = $this
    ->getRoutes('test', new Route('/{slug}/{page}', array(
    'slug' => 'index',
    'page' => 0,
  )));
  $this
    ->assertSame('/app.php/index/1', $this
    ->getGenerator($routes)
    ->generate('test', array(
    'page' => 1,
  )));
  $this
    ->assertSame('/app.php/', $this
    ->getGenerator($routes)
    ->generate('test'));
}