protected function UrlGeneratorTest::getGenerator

12 calls to UrlGeneratorTest::getGenerator()

File

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

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;
}