From fb544b10e8d403e11e2caddc557265b31d335e63 Mon Sep 17 00:00:00 2001 From: bzick Date: Sun, 1 Feb 2015 00:58:40 +0300 Subject: [PATCH] Add more test for 'in' --- tests/TestCase.php | 6 ++++++ tests/cases/Fenom/TemplateTest.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/tests/TestCase.php b/tests/TestCase.php index d20effd..9f97fdb 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -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", diff --git a/tests/cases/Fenom/TemplateTest.php b/tests/cases/Fenom/TemplateTest.php index baf60c2..22af39e 100644 --- a/tests/cases/Fenom/TemplateTest.php +++ b/tests/cases/Fenom/TemplateTest.php @@ -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'), ); }