Add more test for 'in'

This commit is contained in:
bzick 2015-02-01 00:58:40 +03:00
parent 76b5d3e6fa
commit fb544b10e8
2 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,12 @@ class TestCase extends \PHPUnit_Framework_TestCase
"b" => 2,
"two" => 2
),
"level1" => array(
"level2" => array(
"one" => 1,
"two" => 2
)
),
"num" => array(
1 => "one",
2 => "two",

View File

@ -1185,6 +1185,8 @@ class TemplateTest extends TestCase
array('{if $one in keys [1 => "one", 2 => "two", 3 => "three"]} block1 {else} block2 {/if}', 'block1'),
array('{if $one in $two} block1 {else} block2 {/if}', 'block2'),
array('{if $one in $list} block1 {else} block2 {/if}', 'block1'),
array('{if "one" in $num} block1 {else} block2 {/if}', 'block1'),
array('{if "one" in $level1.level2} block1 {else} block2 {/if}', 'block1'),
);
}