mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Add more test for 'in'
This commit is contained in:
@ -29,6 +29,12 @@ class TestCase extends \PHPUnit_Framework_TestCase
|
|||||||
"b" => 2,
|
"b" => 2,
|
||||||
"two" => 2
|
"two" => 2
|
||||||
),
|
),
|
||||||
|
"level1" => array(
|
||||||
|
"level2" => array(
|
||||||
|
"one" => 1,
|
||||||
|
"two" => 2
|
||||||
|
)
|
||||||
|
),
|
||||||
"num" => array(
|
"num" => array(
|
||||||
1 => "one",
|
1 => "one",
|
||||||
2 => "two",
|
2 => "two",
|
||||||
|
@ -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 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 $two} block1 {else} block2 {/if}', 'block2'),
|
||||||
array('{if $one in $list} block1 {else} block2 {/if}', 'block1'),
|
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'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user