/** * Sets up */ public function setUp() { $tempDir = Enlight_TestHelper::Instance()->TestPath('TempFiles'); $this->engine = new Enlight_Template_Manager(); $this->engine->setCompileDir($tempDir); $this->engine->setCacheDir($tempDir); $this->engine->setCompileId('cache'); $this->engine->clearCompiledTemplate(null, 'cache'); $this->engine->clearCache(null, null, 'cache'); Smarty::$global_tpl_vars = array(); }
/** * Set own template directory * * @param $templateManager */ private function reconfigureTemplateDirs(\Enlight_Template_Manager $templateManager) { if (!$this->templateDirConfigured) { $compileDir = $templateManager->getCompileDir() . 'blocks/'; $cacheDir = $templateManager->getCacheDir() . 'blocks/'; $templateManager->setCompileDir($compileDir); $templateManager->setCacheDir($cacheDir); $this->templateDirConfigured = true; } }