From bdbc56d385621f53b14424b37def75237deba065 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Fri, 31 Jan 2014 15:53:51 +0100 Subject: [PATCH] added test for accessing xml attributes --- .../Fixtures/regression/simple_xml_element.test | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/test/Twig/Tests/Fixtures/regression/simple_xml_element.test b/test/Twig/Tests/Fixtures/regression/simple_xml_element.test index 61babef..60c3c51 100644 --- a/test/Twig/Tests/Fixtures/regression/simple_xml_element.test +++ b/test/Twig/Tests/Fixtures/regression/simple_xml_element.test @@ -4,14 +4,16 @@ Twig is able to deal with SimpleXMLElement instances as variables version_compare(phpversion(), '5.3.0', '>=') --TEMPLATE-- Hello '{{ images.image.0.group }}'! +{{ images.image.0.group.attributes.myattr }} {{ images.children().image.count() }} {% for image in images %} - {{ image.group }} {% endfor %} --DATA-- -return array('images' => new SimpleXMLElement('foobar')) +return array('images' => new SimpleXMLElement('foobar')) --EXPECT-- Hello 'foo'! +example 2 - foo - bar -- 1.7.2.5