Add testcase for issue #347
authorHenrik Bjørnskov <henrik@bearwoods.dk>
Wed, 1 Jun 2011 13:27:40 +0000 (15:27 +0200)
committerHenrik Bjørnskov <henrik@bearwoods.dk>
Wed, 1 Jun 2011 13:27:40 +0000 (15:27 +0200)
test/Twig/Tests/Fixtures/tests/array.test [new file with mode: 0644]

diff --git a/test/Twig/Tests/Fixtures/tests/array.test b/test/Twig/Tests/Fixtures/tests/array.test
new file mode 100644 (file)
index 0000000..1429d37
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+array index test
+--TEMPLATE--
+{% for key, value in days %}
+{{ key }}
+{% endfor %}
+--DATA--
+return array('days' => array(
+    1  => array('money' => 9),
+    2  => array('money' => 21),
+    3  => array('money' => 38),
+    4  => array('money' => 6),
+    18 => array('money' => 6),
+    19 => array('money' => 3),
+    31 => array('money' => 11),
+));
+--EXPECT--
+1
+2
+3
+4
+18
+19
+31