diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php b/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php index f73c4120..461c13dd 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php @@ -16,8 +16,6 @@ class CompileSectionTest extends PHPUnit_Smarty public function setUp() { $this->setUpSmarty(__DIR__); - error_reporting(E_ALL | E_STRICT); - $this->smarty->setErrorReporting(error_reporting() & ~(E_NOTICE | E_USER_NOTICE)); } @@ -31,12 +29,14 @@ class CompileSectionTest extends PHPUnit_Smarty public function testSection1() { $tpl = $this->smarty->createTemplate('section1.tpl'); + $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testSection2() { $tpl = $this->smarty->createTemplate('section2.tpl'); + $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } @@ -49,19 +49,22 @@ class CompileSectionTest extends PHPUnit_Smarty public function testSection4() { $tpl = $this->smarty->createTemplate('section4.tpl'); + $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); } public function testSection6() { $tpl = $this->smarty->createTemplate('section6.tpl'); + $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); $this->assertEquals("0123456789total10", $this->smarty->fetch($tpl)); } -/* + public function testSection7() { $tpl = $this->smarty->createTemplate('section7.tpl'); + $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); $this->assertEquals("011223344556677889910", $this->smarty->fetch($tpl)); } -*/ + } diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section1.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section1.tpl index 09ca6cad..50729b42 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section1.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section1.tpl @@ -1 +1 @@ -{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{/section} \ No newline at end of file +{section name=bar loop=$foo}{$foo[bar]}{/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section2.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section2.tpl index b8335b40..be7d4559 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section2.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section2.tpl @@ -1 +1 @@ -{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo start=$i}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file +{section name=bar loop=$foo start=$i}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section4.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section4.tpl index 3915094c..4a49fc9e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section4.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section4.tpl @@ -1 +1 @@ -{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file +{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section6.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section6.tpl index aa625fd6..edcd6c2e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section6.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section6.tpl @@ -1 +1 @@ -{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section}total{$smarty.section.bar.total} \ No newline at end of file +{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section}total{$smarty.section.bar.total} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section7.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section7.tpl index 3cf8c782..6c5f9a99 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates/section7.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/section7.tpl @@ -1 +1 @@ -{assign var=foo value=[0,1,2,3,4,5,6,7,8,9]}{section name=bar loop=$foo}{$smarty.section.bar.index}{$smarty.section.bar.iteration}{sectionelse} else {/section} \ No newline at end of file +{section name=bar loop=$foo}{$smarty.section.bar.index}{$smarty.section.bar.iteration}{sectionelse} else {/section} \ No newline at end of file