/** * @expectedException \InvalidArgumentException */ 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()); }
/** * @expectedException \InvalidArgumentException */ public function testDumpWithoutRoutes() { file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'WithoutRoutesUrlGenerator'))); include $this->testTmpFilepath; $projectUrlGenerator = new \WithoutRoutesUrlGenerator(array('base_url' => '/app.php', 'method' => 'GET', 'host' => 'localhost', 'port' => 80, 'is_secure' => false)); $projectUrlGenerator->generate('Test', array()); }