]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test
twig implementation
[github/wallabag/wallabag.git] / vendor / twig / twig / test / Twig / Tests / Fixtures / tests / in.test
1 --TEST--
2 Twig supports the in operator
3 --TEMPLATE--
4 {% if bar in foo %}
5 TRUE
6 {% endif %}
7 {% if not (bar in foo) %}
8 {% else %}
9 TRUE
10 {% endif %}
11 {% if bar not in foo %}
12 {% else %}
13 TRUE
14 {% endif %}
15 {% if 'a' in bar %}
16 TRUE
17 {% endif %}
18 {% if 'c' not in bar %}
19 TRUE
20 {% endif %}
21 {% if '' not in bar %}
22 TRUE
23 {% endif %}
24 {% if '' in '' %}
25 TRUE
26 {% endif %}
27 {% if '0' not in '' %}
28 TRUE
29 {% endif %}
30 {% if 'a' not in '0' %}
31 TRUE
32 {% endif %}
33 {% if '0' in '0' %}
34 TRUE
35 {% endif %}
36 --DATA--
37 return array('bar' => 'bar', 'foo' => array('bar' => 'bar'))
38 --EXPECT--
39 TRUE
40 TRUE
41 TRUE
42 TRUE
43 TRUE
44 TRUE
45 TRUE
46 TRUE
47 TRUE
48 TRUE