Exemplo n.º 1
0
 /**
  * @return null
  */
 public function setUp()
 {
     $route = 'welcome';
     $ns = 'TestFuel\\Functional\\Action\\Welcome';
     MvcRouteManager::addRoute('welcome', $ns);
     $this->masterKey = $route;
     $this->handler = new MvcRouteHandler($route);
 }
Exemplo n.º 2
0
 /**
  * @return	null
  */
 public function testGetRouteThatExistsButNotLoader()
 {
     $key = 'my-route';
     $key2 = 'alias-a';
     $key3 = 'alias-b';
     $key4 = 'alias-c';
     $ns = 'TestFuel\\Functional\\Action\\TestRouteManager';
     MvcRouteManager::addRoute($key, $ns);
     MvcRouteManager::addRoute($key2, $ns);
     MvcRouteManager::addRoute($key3, $ns);
     MvcRouteManager::addRoute($key4, $ns);
     $this->assertEquals(array(), MvcRouteManager::getAllCache());
     $detail = MvcRouteManager::getRouteDetail($key);
     $this->assertInstanceOf('Appfuel\\Kernel\\Mvc\\MvcRouteDetail', $detail);
     $this->assertSame($detail, MvcRouteManager::getRouteDetail($key2));
     $this->assertSame($detail, MvcRouteManager::getRouteDetail($key3));
     $this->assertSame($detail, MvcRouteManager::getRouteDetail($key4));
 }