diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test new file mode 100644 index 00000000..110aef82 --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test | |||
@@ -0,0 +1,17 @@ | |||
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.children().count() }} | ||
8 | {% for image in images %} | ||
9 | - {{ image.group }} | ||
10 | {% endfor %} | ||
11 | --DATA-- | ||
12 | return array('images' => new SimpleXMLElement('<images><image><group>foo</group></image><image><group>bar</group></image></images>')) | ||
13 | --EXPECT-- | ||
14 | Hello 'foo'! | ||
15 | 2 | ||
16 | - foo | ||
17 | - bar | ||