You are here

public function UrlGeneratorTest::testNotPassedOptionalParameterInBetween in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php \Symfony\Component\Routing\Tests\Generator\UrlGeneratorTest::testNotPassedOptionalParameterInBetween()

File

vendor/symfony/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'));
}