예제 #1
0
 /**
  * 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();
 }
예제 #2
0
 /**
  * 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;
     }
 }