You are here

public function UrlGeneratorTest::testOptionalVariableWithNoRealSeparator in Zircon Profile 8

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

File

vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php, line 353

Class

UrlGeneratorTest

Namespace

Symfony\Component\Routing\Tests\Generator

Code

public function testOptionalVariableWithNoRealSeparator() {
  $routes = $this
    ->getRoutes('test', new Route('/get{what}', array(
    'what' => 'All',
  )));
  $generator = $this
    ->getGenerator($routes);
  $this
    ->assertSame('/app.php/get', $generator
    ->generate('test'));
  $this
    ->assertSame('/app.php/getSites', $generator
    ->generate('test', array(
    'what' => 'Sites',
  )));
}