Ejemplo n.º 1
0
 protected function setUp()
 {
     parent::setUp();
     $this->application->withConfigurationFormat('php')->withRootDir($GLOBALS['application']->rootDir);
     rename($this->application->rootDir . DIRECTORY_SEPARATOR . 'settings' . DIRECTORY_SEPARATOR . \Nano\Application\Config::CONFIG_FILE_NAME, $this->application->rootDir . DIRECTORY_SEPARATOR . 'settings' . DIRECTORY_SEPARATOR . \Nano\Application\Config::CONFIG_FILE_NAME . '.bak');
     rename($this->application->rootDir . DIRECTORY_SEPARATOR . 'settings' . DIRECTORY_SEPARATOR . \Nano\Application\Config::ROUTES_FILE_NAME, $this->application->rootDir . DIRECTORY_SEPARATOR . 'settings' . DIRECTORY_SEPARATOR . \Nano\Application\Config::ROUTES_FILE_NAME . '.bak');
     $builder = new \Nano\Application\Config\Builder($this->application);
     $builder->setSource($this->application->rootDir . DIRECTORY_SEPARATOR . 'settings');
     $builder->setDestination($this->application->rootDir . DIRECTORY_SEPARATOR . 'settings');
     $builder->build('for-test');
     $this->application->configure();
     $this->response = new \Nano\Controller\Response\Test($this->application);
     $this->application->dispatcher->setResponse($this->response);
 }
Ejemplo n.º 2
0
 protected function setUp()
 {
     parent::setUp();
     \Nano::setApplication($this->application);
     $this->includePath = get_include_path();
 }