Add more autoescape tests

This commit is contained in:
homm 2013-07-07 04:26:36 +04:00
parent 22e388ec60
commit 11f1b284e4

View File

@ -16,6 +16,7 @@ class AutoEscapeTest extends TestCase {
array('{$html}', $html, $vars, 0),
array('{$html}', $escaped, $vars, \Fenom::AUTO_ESCAPE),
array('{raw $html}', $html, $vars, \Fenom::AUTO_ESCAPE),
array('{raw $html} {$html}', "$html $escaped", $vars, \Fenom::AUTO_ESCAPE),
array('{raw "{$html|up}"}', strtoupper($html), $vars, \Fenom::AUTO_ESCAPE),
array('{autoescape true}{$html}{/autoescape}, {$html}', "$escaped, $html", $vars, 0),
array('{autoescape false}{$html}{/autoescape}, {$html}', "$html, $escaped", $vars, \Fenom::AUTO_ESCAPE),
@ -52,4 +53,4 @@ class AutoEscapeTest extends TestCase {
$this->fenom->setOptions($options);
$this->assertRender($tpl, $result);
}
}
}