Skip to content
Browse files

added test for hash keys

  • Loading branch information...
1 parent 4bdb3a9 commit 3f64f1d24ca70694215e07e068de5890fb809682 @arnaud-lb committed Nov 12, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/Twig/Tests/Fixtures/expressions/array.test
View
7 test/Twig/Tests/Fixtures/expressions/array.test
@@ -27,6 +27,13 @@ Twig supports array notation
2,
]|join(',')
}}
+
+{# keys can be any expression #}
+{% set a = 1 %}
+{% set b = "foo" %}
+{% set ary = { a: 'a', b: 'b', 'c': 'c', a~b: 'd' } %}
+{{ ary|keys|join(',') }}
+{{ ary|join(',') }}
--DATA--
return array('bar' => 'bar', 'foo' => array('bar' => 'bar'))
--EXPECT--

0 comments on commit 3f64f1d

Please sign in to comment.
Something went wrong with that request. Please try again.