diff --git a/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php b/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php index aeee8fac..b9299db7 100644 --- a/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php +++ b/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php @@ -123,7 +123,7 @@ class HttpModifiedSinceTest extends PHPUnit_Smarty public function testEnabledCached3() { - //$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; + $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; $_SERVER['SMARTY_PHPUNIT_HEADERS'] = array(); $_SERVER['HTTP_IF_MODIFIED_SINCE'] = gmdate('D, d M Y H:i:s', time() + 10) . ' GMT'; $this->smarty->setCacheModifiedCheck(true); diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php index 4f14b4d0..1e66f5bc 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php @@ -73,175 +73,356 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty /** * test child/parent template chain with prepend + * @dataProvider data */ - public function testCompileBlockChildPrepend_003() + public function testCompileBlockChildPrepend_003($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('003_child_prepend.tpl'); - $this->assertContains("prepend - Default Title", $result); + $this->assertContains("prepend - Default Title", $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain with apppend + * @dataProvider data */ - public function testCompileBlockChildAppend_004() + public function testCompileBlockChildAppend_004($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('004_child_append.tpl'); - $this->assertContains("Default Title - append", $result); + $this->assertContains("Default Title - append", $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain with apppend and shorttags + * @dataProvider data */ - public function testCompileBlockChildAppendShortag_005() + public function testCompileBlockChildAppendShortag_005($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('005_child_append_shorttag.tpl'); - $this->assertContains("Default Title - append", $result); + $this->assertContains("Default Title - append", $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain with {$this->smarty.block.child) + * @dataProvider data */ - public function testCompileBlockChildSmartyChild_006() + public function testCompileBlockChildSmartyChild_006($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('006_child_smartychild.tpl'); - $this->assertContains('here is >child text< included', $result); + $this->assertContains('here is >child text< included', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain with {$this->smarty.block.parent) + * @dataProvider data */ - public function testCompileBlockChildSmartyParent_007() + public function testCompileBlockChildSmartyParent_007($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('007_child_smartyparent.tpl'); - $this->assertContains('parent block Default Title is here', $result); + $this->assertContains('parent block Default Title is here', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain loading plugin * @run SeparateProcess * @preserveGlobalState disabled + * @dataProvider data */ - public function testCompileBlockChildPlugin_008() + public function testCompileBlockChildPlugin_008($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('008_child_plugin.tpl'); - $this->assertContains('escaped <text> 1', $result); + $this->assertContains('escaped <text> 1', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test parent template with nested blocks + * @dataProvider data */ - public function testCompileBlockParentNested_009() + public function testCompileBlockParentNested_009($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('009_parent_nested.tpl'); - $this->assertContains('Title with -default- here', $result); + $this->assertContains('Title with -default- here', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain with nested block + * @dataProvider data */ - public function testCompileBlockChildNested_010() + public function testCompileBlockChildNested_010($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('010_child_nested.tpl'); - $this->assertContains('Title with -content from child- here', $result); + $this->assertContains('Title with -content from child- here', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain with nested block and include + * @dataProvider data */ - public function testCompileBlockChildNestedInclude_011() + public function testCompileBlockChildNestedInclude_011($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('011_grandchild_nested_include.tpl'); - $this->assertContains('hello world', $result); + $this->assertContains('hello world', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test grandchild/child/parent template chain + * @dataProvider data */ - public function testCompileBlockGrandChild_012() + public function testCompileBlockGrandChild_012($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('012_grandchild.tpl'); - $this->assertContains('Grandchild Page Title', $result); + $this->assertContains('Grandchild Page Title', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test grandchild/child/parent template chain prepend + * @dataProvider data */ - public function testCompileBlockGrandChildPrepend_013() + public function testCompileBlockGrandChildPrepend_013($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('013_grandchild_prepend.tpl'); - $this->assertContains('grandchild prepend - Page Title', $result); + $this->assertContains('grandchild prepend - Page Title', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test grandchild/child/parent template chain with {$this->smarty.block.child} + * @dataProvider data */ - public function testCompileBlockGrandChildSmartyChild_014() + public function testCompileBlockGrandChildSmartyChild_014($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('014_grandchild_smartychild.tpl'); - $this->assertContains('child title with - grandchild content - here', $result); + $this->assertContains('child title with - grandchild content - here', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test grandchild/child/parent template chain append + * @dataProvider data */ - public function testCompileBlockGrandChildAppend_015() + public function testCompileBlockGrandChildAppend_015($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('015_grandchild_append.tpl'); - $this->assertContains('Page Title - grandchild append', $result); + $this->assertContains('Page Title - grandchild append', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test grandchild/child/parent template chain with nested block + * @dataProvider data */ - public function testCompileBlockGrandChildNested_016() + public function testCompileBlockGrandChildNested_016($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('016_grandchild_nested.tpl'); - $this->assertContains('child title with -grandchild content- here', $result); + $this->assertContains('child title with -grandchild content- here', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test grandchild/child/parent template chain with nested {$this->smarty.block.child} + * @dataProvider data */ - public function testCompileBlockGrandChildNested_017() + public function testCompileBlockGrandChildNested_017($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('017_grandchild_nested.tpl'); - $this->assertContains('child pre -grandchild content- child post', $result); + $this->assertContains('child pre -grandchild content- child post', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test nested child block with hide + * @dataProvider data */ - public function testCompileBlockChildNestedHide_018() + public function testCompileBlockChildNestedHide_018($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('018_child_nested_hide.tpl'); $this->assertContains('nested block', $result); - $this->assertNotContains('should be hidden', $result); + $this->assertNotContains('should be hidden', $result, $testName . ' - content'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test nested child block with hide and auto_literal = false + * @dataProvider data */ - public function testCompileBlockChildNestedHideAutoLiteralFalse_019() + public function testCompileBlockChildNestedHideAutoLiteralFalse_019($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $this->smarty->setAutoLiteral(false); $result = $this->smarty->fetch('019_child_nested_hide_autoliteral.tpl'); - $this->assertContains('nested block', $result); - $this->assertNotContains('should be hidden', $result); + $this->assertContains('nested block', $result, $testName . ' - content'); + $this->assertNotContains('should be hidden', $result, $testName . ' - content2'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** * test child/parent template chain starting in subtempates + * @dataProvider data */ - public function testCompileBlockStartSubTemplates_020() + public function testCompileBlockStartSubTemplates_020($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } $result = $this->smarty->fetch('020_include_root.tpl'); - $this->assertContains('page 1', $result); - $this->assertContains('page 2', $result); - $this->assertContains('page 3', $result); - $this->assertContains('block 1', $result); - $this->assertContains('block 2', $result); - $this->assertContains('block 3', $result); + $this->assertContains('page 1', $result, $testName . ' - content1'); + $this->assertContains('page 2', $result, $testName . ' - content2'); + $this->assertContains('page 3', $result, $testName . ' - content3'); + $this->assertContains('block 1', $result, $testName . ' - content4'); + $this->assertContains('block 2', $result, $testName . ' - content5'); + $this->assertContains('block 3', $result, $testName . ' - content6'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); + } + + /** + * test grandchild/child/parent template chain with nested {$this->smarty.block.child} and {include nocache} + * @dataProvider data + */ + public function testCompileBlockGrandChildNested_030($caching, $merge, $testNumber, $compileTestNumber, $renderTestNumber, $testName) + { + $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); + $this->smarty->assign('test', $testNumber); + $this->smarty->caching = $caching; + $this->smarty->merge_compiled_includes = $merge; + if ($merge) { + $this->smarty->compile_id = 1; + } + $result = $this->smarty->fetch('030_grandchild_nested.tpl'); + $this->assertContains('child pre -grandchild content- child post', $result, $testName . ' - content'); + $this->assertContains('include:' . $testNumber, $result, $testName . ' - content 2'); + $this->assertContains("test:{$testNumber} compiled:{$compileTestNumber} rendered:{$renderTestNumber}", $result, $testName . ' - fetch() failure'); } /** diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/003_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/003_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/003_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/003_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/004_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/004_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/004_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/004_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/005_parent_shorttag.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/005_parent_shorttag.tpl index 46b6eef0..fbe3880a 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/005_parent_shorttag.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/005_parent_shorttag.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test}

{block 'title'}Default Title{/block}

diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/006_parent_smartychild.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/006_parent_smartychild.tpl index 674a693b..4673ccb7 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/006_parent_smartychild.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/006_parent_smartychild.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}here is >{$smarty.block.child}< included{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/007_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/007_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/007_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/007_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/008_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/008_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/008_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/008_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/009_parent_nested.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/009_parent_nested.tpl index cf08ca02..e7d9c71b 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/009_parent_nested.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/009_parent_nested.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Title with {block name='title_content'}-default-{/block} here{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/010_parent_nested.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/010_parent_nested.tpl index cf08ca02..e7d9c71b 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/010_parent_nested.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/010_parent_nested.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Title with {block name='title_content'}-default-{/block} here{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/011_parent_nested_include.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/011_parent_nested_include.tpl index 98f212e2..adf5e27f 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/011_parent_nested_include.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/011_parent_nested_include.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='body'}-default-{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/012_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/012_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/012_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/012_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/013_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/013_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/013_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/013_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/014_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/014_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/014_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/014_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/015_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/015_parent.tpl index e007864b..afcf7d7c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/015_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/015_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/016_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/016_parent.tpl index 03ddb708..e63816d2 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/016_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/016_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='title'}Default Title{/block} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/017_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/017_parent.tpl index 34d9deda..70c36693 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/017_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/017_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='content1'}Default content{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/018_parent_nested.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/018_parent_nested.tpl index b778c3a1..b000d4a9 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/018_parent_nested.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/018_parent_nested.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='index'}{/block} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/019_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/019_parent.tpl index b778c3a1..b000d4a9 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/019_parent.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/019_parent.tpl @@ -1 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} {block name='index'}{/block} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/020_include_root.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/020_include_root.tpl index bc0c3119..a27b2857 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/020_include_root.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/020_include_root.tpl @@ -1,3 +1,4 @@ +test:{$test nocache} compiled:# rendered:{$test} {include file='020_include_1.tpl'} {include file='020_include_2.tpl'} {include file='020_include_3.tpl'} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_child_nested.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_child_nested.tpl new file mode 100644 index 00000000..92d60419 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_child_nested.tpl @@ -0,0 +1,6 @@ +{extends file='030_parent.tpl'} +{block name='content1'} + {block name='content2'} + child pre {$smarty.block.child} child post {include file='030_include.tpl' nocache} + {/block} +{/block} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_grandchild_nested.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_grandchild_nested.tpl new file mode 100644 index 00000000..8e219545 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_grandchild_nested.tpl @@ -0,0 +1,2 @@ +{extends file='030_child_nested.tpl'} +{block name='content2'}-grandchild content-{/block} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_include.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_include.tpl new file mode 100644 index 00000000..a2848d8e --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_include.tpl @@ -0,0 +1 @@ +include:{$test nocache} diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_parent.tpl b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_parent.tpl new file mode 100644 index 00000000..70c36693 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates/030_parent.tpl @@ -0,0 +1,2 @@ +test:{$test nocache} compiled:# rendered:{$test} +{block name='content1'}Default content{/block}