public function UrlGeneratorTest::testOptionalVariableWithNoRealSeparator

File

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

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',
  )));
}