protected function setUp() { $this->app->backup(); require_once $this->files->get($this, '/controllers/Test.php'); $this->application = new \Nano\Application(); $this->application->withRootDir($GLOBALS['application']->rootDir)->withConfigurationFormat('php')->withModule('module1', $this->files->get($this, '/module1'))->withModule('module2', $this->files->get($this, '/module2'))->configure(); $this->renderer = new \Nano\Render($this->application); $this->renderer->setViewsPath($this->files->get($this, '/views')); $this->renderer->setModuleViewsDirName('views/default'); $this->renderer->setLayoutsPath($this->files->get($this, '/layouts')); $this->controller = new \App\Controller\Test($this->application); }
/** * @return void */ protected function configureRenderer() { $this->renderer->setLayoutsPath(\Nano::app()->rootDir . DIRECTORY_SEPARATOR . \Nano\Render::LAYOUT_DIR); $this->renderer->setViewsPath(\Nano::app()->rootDir . DIRECTORY_SEPARATOR . \Nano\Render::VIEW_DIR); $this->renderer->setModuleViewsDirName(\Nano\Render::VIEW_DIR); }