/** * @depends testCompile * @expectedException Dispatcher\Exception\RouteNotFoundException */ public function testGeneratorInvalidArgs() { $router = new Router(xfile); $router->getroute("foobar_x", 'foobar', 'xxx'); }
/** * @expectedException RuntimeException */ public function testAppNotFound() { $route = new Router(file); $route->setApplication('foo bar'); }
public function testCompile() { $file = __DIR__ . '/generated/' . __CLASS__ . '.php'; define('xfile', $file); $router = new Dispatcher\Router($file); $router->addFile(__FILE__)->setNamespace(__CLASS__); $this->assertFalse(file_Exists($file)); $router->load(); $this->assertTrue(file_Exists($file)); }