diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php b/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php index d8ae5b2d..af831b0c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php @@ -287,4 +287,14 @@ class CompileForeachTest extends PHPUnit_Smarty $this->assertEquals("a1a2a1a2", $this->smarty->fetch('035_foreach.tpl')); } + public function testForeachIsset_36() + { + $this->assertEquals("false", + $this->smarty->fetch('036_foreach.tpl')); + } + public function testForeachIsset_37() + { + $this->assertEquals("false", + $this->smarty->fetch('037_foreach.tpl')); + } } diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/templates/036_foreach.tpl b/tests/UnitTests/TemplateSource/TagTests/Foreach/templates/036_foreach.tpl new file mode 100644 index 00000000..9aa2865c --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Foreach/templates/036_foreach.tpl @@ -0,0 +1 @@ +{if !isset($smarty.foreach.name.index)}false{/if} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/templates/037_foreach.tpl b/tests/UnitTests/TemplateSource/TagTests/Foreach/templates/037_foreach.tpl new file mode 100644 index 00000000..81ba1e51 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Foreach/templates/037_foreach.tpl @@ -0,0 +1 @@ +{if false}no{elseif !isset($smarty.foreach.name.index)}false{/if} \ No newline at end of file