Пример #1
0
 public function add($pattern, $controller = 'index', $action = 'index')
 {
     $this->addRoute(Nano_Route::create($pattern, $controller, $action));
     return $this;
 }
Пример #2
0
 public function testVithVariables()
 {
     $result = $this->dispatcher->run(Nano_Route::create('', 'test', 'testvar'));
     $this->assertEquals('Some title. 01=foo.03=bar.', $result);
 }
Пример #3
0
 /**
  * @return string
  * @param string $controller
  * @param string $action
  */
 protected function runAction($controller, $action)
 {
     return $this->dispatcher->clean()->run(Nano_Route::create('', $controller, $action));
 }
Пример #4
0
 public function testGetController()
 {
     $c = $this->dispatcher->getController(Nano_Route::create('', 'test', 'test'));
     $this->assertType('Nano_C', $c);
     $this->assertType('TestController', $c);
 }