function testCanAccessChildrenOfXmlObject() { $data = '<root><child>One</child><child>Two</child></root>'; $xml = new T_Xml($data); $expect = new T_Xml_Element($data); foreach ($xml->children() as $v) { $xml_child[] = (string) $v; } foreach ($expect->children() as $v) { $expect_child[] = (string) $v; } $this->assertEquals($xml_child, $expect_child); }