aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test')
-rw-r--r--vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test48
1 files changed, 48 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test
new file mode 100644
index 00000000..45c72fd2
--- /dev/null
+++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test
@@ -0,0 +1,48 @@
1--TEST--
2Twig supports the in operator
3--TEMPLATE--
4{% if bar in foo %}
5TRUE
6{% endif %}
7{% if not (bar in foo) %}
8{% else %}
9TRUE
10{% endif %}
11{% if bar not in foo %}
12{% else %}
13TRUE
14{% endif %}
15{% if 'a' in bar %}
16TRUE
17{% endif %}
18{% if 'c' not in bar %}
19TRUE
20{% endif %}
21{% if '' not in bar %}
22TRUE
23{% endif %}
24{% if '' in '' %}
25TRUE
26{% endif %}
27{% if '0' not in '' %}
28TRUE
29{% endif %}
30{% if 'a' not in '0' %}
31TRUE
32{% endif %}
33{% if '0' in '0' %}
34TRUE
35{% endif %}
36--DATA--
37return array('bar' => 'bar', 'foo' => array('bar' => 'bar'))
38--EXPECT--
39TRUE
40TRUE
41TRUE
42TRUE
43TRUE
44TRUE
45TRUE
46TRUE
47TRUE
48TRUE