diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php index c5bec31d..772349ea 100644 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php @@ -23,6 +23,25 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty $this->cleanDirs(); } + /** + * test function plugin nocache tag + * @runInSeparateProcess + */ + public function testFunctionPluginFromTemplateFileNocache1() + { + $this->smarty->setCaching(true); + $this->assertEquals("1", $this->smarty->fetch('functionplugintestnocache.tpl')); + } + /** + * test function plugin tag in template file + * @runInSeparateProcess + */ + public function testFunctionPluginFromTemplateFileNocache2() + { + $this->smarty->setCaching(true); + $this->assertEquals("1", $this->smarty->fetch('functionplugintestnocache.tpl')); + } + /** * test function plugin tag in template file */ @@ -31,7 +50,6 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty $tpl = $this->smarty->createTemplate('functionplugintest.tpl', $this->smarty); $this->assertEquals("10", $this->smarty->fetch($tpl)); } - /** * test function plugin tag in compiled template file */ diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl new file mode 100644 index 00000000..c4e1f8b0 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl @@ -0,0 +1 @@ +{counter nocache} \ No newline at end of file