summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Wisselink <wisskid@users.noreply.github.com>2024-03-25 13:54:02 +0100
committerGitHub <noreply@github.com>2024-03-25 13:54:02 +0100
commit1da30e76e835b2b8d0c8367fc3df0c5c5163688b (patch)
treea3260abd92033ccd4bf00399395f3b07086a9ebb /tests
parent58348c38ef24611d0fc7d17ce6a15c0dfbc600d8 (diff)
downloadsmarty-1da30e76e835b2b8d0c8367fc3df0c5c5163688b.tar.gz
smarty-1da30e76e835b2b8d0c8367fc3df0c5c5163688b.tar.bz2
smarty-1da30e76e835b2b8d0c8367fc3df0c5c5163688b.zip
Documented support for `is in`, added support for `is not in`. (#955)
* Documented support for `is in`, added support for `is not in`. Fixes #937 * minor docs improvement
Diffstat (limited to 'tests')
-rw-r--r--tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php b/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php
index 82ee9718..a45becc0 100644
--- a/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php
+++ b/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php
@@ -169,6 +169,12 @@ class CompileIfTest extends PHPUnit_Smarty
array('{if {counter start=1} == 1}yes{else}no{/if}', 'yes', 'Tag1', $i ++),
array('{if false}false{elseif {counter start=1} == 1}yes{else}no{/if}', 'yes', 'Tag2', $i ++),
array('{if {counter start=1} == 0}false{elseif {counter} == 2}yes{else}no{/if}', 'yes', 'Tag3', $i ++),
+
+ array('{if 2 is in ["foo", 2]}yes{else}no{/if}', 'yes', 'IsIn', $i++),
+ array('{if 2 is in ["foo", "bar"]}yes{else}no{/if}', 'no', 'IsIn2', $i++),
+ array('{if 2 is not in ["foo", "bar"]}yes{else}no{/if}', 'yes', 'IsNotIn', $i++),
+ array('{if 2 is not in ["foo", 2]}yes{else}no{/if}', 'no', 'IsNotIn2', $i++),
+
);
}