compiler = new Dwoo_Compiler(); $this->dwoo = new Dwoo(DWOO_COMPILE_DIR, DWOO_CACHE_DIR); } public function testHtmlFormat() { $tpl = new Dwoo_Template_String("

abc


"); $tpl->forceCompilation(); $dwoo = new Dwoo(DWOO_COMPILE_DIR, DWOO_CACHE_DIR); $dwoo->addFilter('html_format', true); $this->assertEquals(str_replace("\r", '', <<

abc


SNIPPET ), $dwoo->get($tpl, array(), $this->compiler)); } public function testSmartyCompat() { $tpl = new Dwoo_Template_String('{ldelim}{$smarty.version}{rdelim}'); $tpl->forceCompilation(); $cmp = new Dwoo_Compiler(); $cmp->addPreProcessor('smarty_compat', true); $this->assertEquals('{'.Dwoo::VERSION.'}', $this->dwoo->get($tpl, array(), $cmp)); } }