Example #1
0
 /**
  *  @depends testCompile
  *  @expectedException Dispatcher\Exception\RouteNotFoundException
  */
 public function testGeneratorInvalidArgs()
 {
     $router = new Router(xfile);
     $router->getroute("foobar_x", 'foobar', 'xxx');
 }
Example #2
0
 /**
  *  @expectedException RuntimeException
  */
 public function testAppNotFound()
 {
     $route = new Router(file);
     $route->setApplication('foo bar');
 }
Example #3
0
 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));
 }