function testCanAddAnAttributeToXmlObject() { $xml = new T_Xml('<root>data</root>'); $xml->addAttribute('attr', 'value'); $expect = new T_Xml_Element('<root>data</root>'); $expect->addAttribute('attr', 'value'); $this->assertSame($xml->asXml(), $expect->asXml()); }