Ejemplo n.º 1
0
 /**
  * @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;
 }
Ejemplo n.º 2
0
 /**
  * @description main function
  */
 public function run()
 {
     $this->setUrl();
     if ($this->config['generateRoutesPath']) {
         $this->collection->generateRoutesPath();
     }
     if ($this->match()) {
         $this->callTarget();
     }
     $this->callResponse();
 }