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