mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
Test isset() 0n $smarty.foreache special variables
This commit is contained in:
@@ -287,4 +287,14 @@ class CompileForeachTest extends PHPUnit_Smarty
|
|||||||
$this->assertEquals("a1a2a1a2",
|
$this->assertEquals("a1a2a1a2",
|
||||||
$this->smarty->fetch('035_foreach.tpl'));
|
$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'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
{if !isset($smarty.foreach.name.index)}false{/if}
|
@@ -0,0 +1 @@
|
|||||||
|
{if false}no{elseif !isset($smarty.foreach.name.index)}false{/if}
|
Reference in New Issue
Block a user