Security update to Drupal 8.4.6
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / regression / simple_xml_element.test
1 --TEST--
2 Twig is able to deal with SimpleXMLElement instances as variables
3 --CONDITION--
4 version_compare(phpversion(), '5.3.0', '>=')
5 --TEMPLATE--
6 Hello '{{ images.image.0.group }}'!
7 {{ images.image.0.group.attributes.myattr }}
8 {{ images.children().image.count() }}
9 {% for image in images %}
10     - {{ image.group }}
11 {% endfor %}
12 --DATA--
13 return array('images' => new SimpleXMLElement('<images><image><group myattr="example">foo</group></image><image><group>bar</group></image></images>'))
14 --EXPECT--
15 Hello 'foo'!
16 example
17 2
18     - foo
19     - bar