File
- drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php, line 105
Class
- PhpGeneratorDumperTest
Namespace
Symfony\Component\Routing\Tests\Generator\Dumper
Code
public function testDumpForRouteWithDefaults() {
$this->routeCollection
->add('Test', new Route('/testing/{foo}', array(
'foo' => 'bar',
)));
file_put_contents($this->testTmpFilepath, $this->generatorDumper
->dump(array(
'class' => 'DefaultRoutesUrlGenerator',
)));
include $this->testTmpFilepath;
$projectUrlGenerator = new \DefaultRoutesUrlGenerator(new RequestContext());
$url = $projectUrlGenerator
->generate('Test', array());
$this
->assertEquals($url, '/testing');
}