mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
Extend setfilter tag test
This commit is contained in:
@@ -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', '<a@b.c>');
|
||||
$this->assertEquals("<a@b.c> <a@b.c><a@b.c> <a [AT] b [DOT] c><a [AT] b [DOT] 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', '<e@f.d>');
|
||||
$this->assertEquals( }
|
||||
"<a@b.c> <a@b.c><e@f.d> <a [AT] b [DOT] c><e [AT] f [DOT] d> <a@b.c> <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', '<a@b.c>');
|
||||
|
Reference in New Issue
Block a user