diff --git a/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php b/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php new file mode 100644 index 00000000..7c900349 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php @@ -0,0 +1,42 @@ +setUpSmarty(dirname(__FILE__)); + } + + public function testInit() + { + $this->cleanDirs(); + } + + public function testSection_001() + { + $this->smarty->assign('foo', array('a', 'b', 'c')); + $this->assertEquals('abc', $this->smarty->fetch('001_section.tpl')); + } + public function testSection_002() + { + $this->smarty->assign('foo', array('a', 'b', 'c')); + $this->assertEquals('abc', $this->smarty->fetch('002_section.tpl')); + } + + +} diff --git a/tests/UnitTests/TemplateSource/_Issues/428/cache/dummy.txt b/tests/UnitTests/TemplateSource/_Issues/428/cache/dummy.txt new file mode 100644 index 00000000..2995a4d0 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/428/cache/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/_Issues/428/templates/001_section.tpl b/tests/UnitTests/TemplateSource/_Issues/428/templates/001_section.tpl new file mode 100644 index 00000000..ea6dc9ab --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/428/templates/001_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$foo[bar.index]}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/_Issues/428/templates/002_section.tpl b/tests/UnitTests/TemplateSource/_Issues/428/templates/002_section.tpl new file mode 100644 index 00000000..4a49fc9e --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/428/templates/002_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/_Issues/428/templates_c/dummy.txt b/tests/UnitTests/TemplateSource/_Issues/428/templates_c/dummy.txt new file mode 100644 index 00000000..2995a4d0 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/428/templates_c/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file