Esempio n. 1
0
 protected function _init()
 {
     $templatesDir = $this->getTemplatesDir();
     if (is_null($this->_templateEngine)) {
         $this->_templateEngine = new Miao_TemplatesEngine_PhpNative($templatesDir);
     } else {
         $this->_templateEngine->setTemplatesDir($templatesDir);
         $this->_templateEngine->resetTemplateVariables();
     }
 }
Esempio n. 2
0
 /**
  * @dataProvider data4SetTemplatesDir
  *
  */
 public function testSetTemplatesDir($in, $out)
 {
     $pn = new Miao_TemplatesEngine_PhpNative();
     $pn->setTemplatesDir($in);
     $this->assertEquals($pn->getTemplatesDir(), $out);
 }