diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test new file mode 100644 index 00000000..4301ef2f --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test | |||
@@ -0,0 +1,10 @@ | |||
1 | --TEST-- | ||
2 | "for" tag | ||
3 | --TEMPLATE-- | ||
4 | {% for i, item in items if i > 0 %} | ||
5 | {{ loop.last }} | ||
6 | {% endfor %} | ||
7 | --DATA-- | ||
8 | return array('items' => array('a', 'b')) | ||
9 | --EXCEPTION-- | ||
10 | Twig_Error_Syntax: The "loop.last" variable is not defined when looping with a condition in "index.twig" at line 3 | ||