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(); } }
/** * @dataProvider data4SetTemplatesDir * */ public function testSetTemplatesDir($in, $out) { $pn = new Miao_TemplatesEngine_PhpNative(); $pn->setTemplatesDir($in); $this->assertEquals($pn->getTemplatesDir(), $out); }