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