mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 17:36:53 +00:00
added test for hash keys
This commit is contained in:
@@ -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--
|
||||
|
||||
Reference in New Issue
Block a user