diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php index dd8d2e48..161f3541 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php @@ -18,6 +18,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty public function setUp() { $this->setUpSmarty(__DIR__); + //$this->smarty->setMergeCompiledIncludes(true); } @@ -465,7 +466,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty /** * test grandchild/child/parent template chain with nested {$this->smarty.block.child} and {include nocache} - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider data */ @@ -714,4 +715,19 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty array(true, true, 8, 7, 7, 'caching, merge - exits'), ); } + + /* + * Test post filter on {block} + */ + public function testPostFilter_031(){ + function smarty_postfilter_test031($compiled, Smarty_Internal_Template $template) + { + return str_replace("'foo'", "'bar'", $compiled); + } + $this->smarty->loadFilter('post','test031'); + $this->smarty->assign('foo','foo'); + $this->smarty->assign('bar','bar'); + $this->assertContains('bar', $this->smarty->fetch('031_post_filter.tpl')); + + } } diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/031_post_filter.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/031_post_filter.tpl new file mode 100644 index 00000000..bfbcb272 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/031_post_filter.tpl @@ -0,0 +1 @@ +{block name='title'}{$foo}{/block}