added test for hash keys

This commit is contained in:
Arnaud Le Blanc
2011-11-12 11:56:47 +01:00
parent 4bdb3a93a8
commit 3f64f1d24c
@@ -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--