You are here

public function PhpGeneratorDumperTest::testDumpWithoutRoutes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php \Symfony\Component\Routing\Tests\Generator\Dumper\PhpGeneratorDumperTest::testDumpWithoutRoutes()

@expectedException \InvalidArgumentException

File

vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php, line 81

Class

PhpGeneratorDumperTest

Namespace

Symfony\Component\Routing\Tests\Generator\Dumper

Code

public function testDumpWithoutRoutes() {
  file_put_contents($this->testTmpFilepath, $this->generatorDumper
    ->dump(array(
    'class' => 'WithoutRoutesUrlGenerator',
  )));
  include $this->testTmpFilepath;
  $projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext('/app.php'));
  $projectUrlGenerator
    ->generate('Test', array());
}