function testCanAccessAttributesOfXmlObject() { $xml = new T_Xml('<root attr="value"></root>'); $expect = new T_Xml_Element('<root attr="value"></root>'); foreach ($xml->attributes() as $k => $v) { $xml_attr[$k] = (string) $v; } foreach ($expect->attributes() as $k => $v) { $expect_attr[$k] = (string) $v; } $this->assertEquals($xml_attr, $expect_attr); }