public function PhpGeneratorDumperTest::testDumpForRouteWithDefaults in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php \Symfony\Component\Routing\Tests\Generator\Dumper\PhpGeneratorDumperTest::testDumpForRouteWithDefaults()
File
- vendor/
symfony/ routing/ Tests/ Generator/ Dumper/ PhpGeneratorDumperTest.php, line 105
Class
Namespace
Symfony\Component\Routing\Tests\Generator\DumperCode
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');
}