diff --git a/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php b/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php index f4eea5ce..536b691e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php @@ -72,6 +72,8 @@ class CompileInsertTest extends PHPUnit_Smarty /** * test insert plugin + * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testInsertPlugin1() { @@ -97,6 +99,8 @@ class CompileInsertTest extends PHPUnit_Smarty /** * test insert plugin caching + * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testInsertPluginCaching1_1() { @@ -161,6 +165,8 @@ class CompileInsertTest extends PHPUnit_Smarty } /** * test insert plugin caching 2 + * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testInsertPluginCaching2_1() { @@ -186,12 +192,36 @@ class CompileInsertTest extends PHPUnit_Smarty $this->smarty->compile_id = 1; $tpl = $this->smarty->createTemplate('insertplugintest.tpl'); $tpl->assign('foo', 'buh'); - $this->assertEquals('param foo bar globalvar global 2', $this->smarty->fetch($tpl)); + $this->assertContains('param foo bar globalvar global 2', $this->smarty->fetch($tpl)); + } + /** + * test insert plugin caching 3 + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testInsertPluginCaching3_1() + { + $this->smarty->caching = true; + $this->assertContains(time().'Inner template', $this->smarty->fetch('insertplugintest2.tpl')); + } + + /** + * test insert plugin caching 2 + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testInsertPluginCaching3_2() + { + sleep(2); + $this->smarty->caching = true; + $this->assertContains(time().'Inner template', $this->smarty->fetch('insertplugintest2.tpl')); } /** * test inserted function none existing function + * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testInsertFunctionNoneExistingFunction() { @@ -209,6 +239,8 @@ class CompileInsertTest extends PHPUnit_Smarty /** * test inserted function none existing script + * @runInSeparateProcess + * @preserveGlobalState disabled */ public function testInsertFunctionNoneExistingScript() { diff --git a/tests/UnitTests/TemplateSource/TagTests/Insert/PHPunitplugins/insert.test2.php b/tests/UnitTests/TemplateSource/TagTests/Insert/PHPunitplugins/insert.test2.php new file mode 100644 index 00000000..597ffd1e --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Insert/PHPunitplugins/insert.test2.php @@ -0,0 +1,5 @@ +