Extend setfilter tag test

This commit is contained in:
Uwe Tews
2017-11-20 11:26:25 +01:00
parent 9d52ba99f7
commit 1a11b61b73

View File

@@ -42,8 +42,8 @@ class CompileSetfilterTest extends PHPUnit_Smarty
$this->smarty->setCaching(1); $this->smarty->setCaching(1);
$tpl = $this->smarty->createTemplate('string:{$foo}{setfilter htmlspecialchars} {$foo}{$foo nocache}{setfilter escape:"mail"} {$foo}{$foo nocache}{/setfilter} {$foo}{/setfilter} {$foo}'); $tpl = $this->smarty->createTemplate('string:{$foo}{setfilter htmlspecialchars} {$foo}{$foo nocache}{setfilter escape:"mail"} {$foo}{$foo nocache}{/setfilter} {$foo}{/setfilter} {$foo}');
$tpl->assign('foo', '<e@f.d>'); $tpl->assign('foo', '<e@f.d>');
$this->assertEquals( } $this->assertEquals("<a@b.c> &lt;a@b.c&gt;&lt;e@f.d&gt; <a [AT] b [DOT] c><e [AT] f [DOT] d> &lt;a@b.c&gt; <a@b.c>", $this->smarty->fetch($tpl));
"<a@b.c> &lt;a@b.c&gt;&lt;e@f.d&gt; <a [AT] b [DOT] c><e [AT] f [DOT] d> &lt;a@b.c&gt; <a@b.c>", $this->smarty->fetch($tpl)); }
/** /**
* @runInSeparateProcess * @runInSeparateProcess
* @preserveGlobalState disabled * @preserveGlobalState disabled