diff options
| author | Simon Wisselink <wisskid@users.noreply.github.com> | 2024-03-25 13:54:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-25 13:54:02 +0100 |
| commit | 1da30e76e835b2b8d0c8367fc3df0c5c5163688b (patch) | |
| tree | a3260abd92033ccd4bf00399395f3b07086a9ebb /tests | |
| parent | 58348c38ef24611d0fc7d17ce6a15c0dfbc600d8 (diff) | |
| download | smarty-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.php | 6 |
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++), + ); } |
