@@ -25,21 +25,13 @@ public function testInit()
2525
2626 /**
2727 * test function plugin nocache tag
28- * @runInSeparateProcess
2928 */
3029 public function testFunctionPluginFromTemplateFileNocache1 ()
3130 {
3231 $ this ->smarty ->setCaching (true );
33- $ this ->assertEquals ("1 " , $ this ->smarty ->fetch ('functionplugintestnocache.tpl ' ));
34- }
35- /**
36- * test function plugin tag in template file
37- * @runInSeparateProcess
38- */
39- public function testFunctionPluginFromTemplateFileNocache2 ()
40- {
41- $ this ->smarty ->setCaching (true );
42- $ this ->assertEquals ("1 " , $ this ->smarty ->fetch ('functionplugintestnocache.tpl ' ));
32+ $ tpl = $ this ->smarty ->createTemplate ('functionplugintestnocache.tpl ' , $ this ->smarty );
33+ $ this ->assertEquals ("1 " , $ this ->smarty ->fetch ($ tpl ));
34+ $ this ->assertContains ("%%*/<?php \$_smarty = \$_smarty_tpl->smarty; if (!is_callable( \\'smarty_function_counter \\')) " , file_get_contents ($ tpl ->compiled ->filepath ));
4335 }
4436
4537 /**
@@ -49,6 +41,7 @@ public function testFunctionPluginFromTemplateFile()
4941 {
5042 $ tpl = $ this ->smarty ->createTemplate ('functionplugintest.tpl ' , $ this ->smarty );
5143 $ this ->assertEquals ("10 " , $ this ->smarty ->fetch ($ tpl ));
44+ $ this ->assertContains ("if (!is_callable('smarty_function_counter')) " , file_get_contents ($ tpl ->compiled ->filepath ));
5245 }
5346 /**
5447 * test function plugin tag in compiled template file
0 commit comments