/** * @depends testCountRoutes * @param RouteCollection $collection * @return \JetFire\Routing\RouteCollection */ public function testGenerateRoutes(RouteCollection $collection) { $_SERVER['SERVER_NAME'] = 'localhost'; $_SERVER['SCRIPT_NAME'] = ''; $this->assertTrue($collection->generateRoutesPath()); return $collection; }
/** * @description main function */ public function run() { $this->setUrl(); if ($this->config['generateRoutesPath']) { $this->collection->generateRoutesPath(); } if ($this->match()) { $this->callTarget(); } $this->callResponse(); }