diff --git a/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php b/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php index 21227faa..f0cd25fa 100644 --- a/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php @@ -26,10 +26,29 @@ class CompileSetfilterTest extends PHPUnit_Smarty $this->cleanDirs(); } /** - * @runInSeparateProcess + * @run + * InSeparateProcess * @preserveGlobalState disabled */ public function testNestedSetfilter() + { + $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->assign('foo', ''); + $this->assertEquals(" <a@b.c><a@b.c> <a@b.c> ", $this->smarty->fetch($tpl)); + } + public function testNestedSetfilter1() + { + $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->assign('foo', ''); + $this->assertEquals( } +" <a@b.c><e@f.d> <a@b.c> ", $this->smarty->fetch($tpl)); + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testNestedSetfilter2() { $tpl = $this->smarty->createTemplate('string:{$foo}{setfilter htmlspecialchars} {$foo}{setfilter escape:"mail"} {$foo}{/setfilter} {$foo}{/setfilter} {$foo}'); $tpl->assign('foo', '');