diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php index 2ed5f75b..b17580ba 100644 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php @@ -18,6 +18,7 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty public function setUp() { $this->setUpSmarty(dirname(__FILE__)); + $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); } public function testInit() @@ -30,10 +31,11 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty */ public function testFunctionPluginFromTemplateFileNocache1() { + $this->smarty->assign('foo',5); $this->smarty->setCaching(true); $tpl = $this->smarty->createTemplate('functionplugintestnocache.tpl', $this->smarty); - $this->assertEquals("2", $this->smarty->fetch($tpl)); - $this->assertContains("%%*/smarty; if (!is_callable(\\'smarty_function_counter\\'))", file_get_contents($tpl->compiled->filepath)); + $this->assertEquals("5", $this->smarty->fetch($tpl)); + $this->assertContains("%%*/smarty; if (!is_callable(\\'smarty_function_getvar\\'))", file_get_contents($tpl->compiled->filepath)); } /** diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl index c4e1f8b0..9134519a 100644 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl @@ -1 +1 @@ -{counter nocache} \ No newline at end of file +{getvar var=foo nocache} \ No newline at end of file