diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test new file mode 100644 index 00000000..c1c3d276 --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test | |||
@@ -0,0 +1,22 @@ | |||
1 | --TEST-- | ||
2 | "if" creates a condition | ||
3 | --TEMPLATE-- | ||
4 | {% if a is defined %} | ||
5 | {{ a }} | ||
6 | {% elseif b is defined %} | ||
7 | {{ b }} | ||
8 | {% else %} | ||
9 | NOTHING | ||
10 | {% endif %} | ||
11 | --DATA-- | ||
12 | return array('a' => 'a') | ||
13 | --EXPECT-- | ||
14 | a | ||
15 | --DATA-- | ||
16 | return array('b' => 'b') | ||
17 | --EXPECT-- | ||
18 | b | ||
19 | --DATA-- | ||
20 | return array() | ||
21 | --EXPECT-- | ||
22 | NOTHING | ||