protected function UrlGeneratorTest::getGenerator

4 calls to UrlGeneratorTest::getGenerator()
UrlGeneratorTest::testGenerateForRouteWithInvalidOptionalParameterNonStrict in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
UrlGeneratorTest::testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLogger in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
UrlGeneratorTest::testUrlWithExtraParametersFromGlobals in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
UrlGeneratorTest::testUrlWithGlobalParameter in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php

File

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

Class

UrlGeneratorTest

Namespace

Symfony\Component\Routing\Tests\Generator

Code

protected function getGenerator(RouteCollection $routes, array $parameters = array(), $logger = null) {
  $context = new RequestContext('/app.php');
  foreach ($parameters as $key => $value) {
    $method = 'set' . $key;
    $context
      ->{$method}($value);
  }
  $generator = new UrlGenerator($routes, $context, $logger);
  return $generator;
}