Exemple #1
0
    public function testHtmlFormat()
    {
        $tpl = new Dwoo_Template_String("<html><body><div><p>a<em>b</em>c<hr /></p><textarea>a\n  b</textarea></div></body><html>");
        $tpl->forceCompilation();
        $dwoo = new Dwoo(DWOO_COMPILE_DIR, DWOO_CACHE_DIR);
        $dwoo->addFilter('html_format', true);
        $this->assertEquals(str_replace("\r", '', <<<SNIPPET

<html>
<body>
\t<div>
\t\t<p>
\t\t\ta<em>b</em>c
\t\t\t<hr />
\t\t</p><textarea>a
  b</textarea>
\t</div>
</body>
<html>
SNIPPET
), $dwoo->get($tpl, array(), $this->compiler));
    }