"; $result = $xmlobj->toString(); $this->assertSame($expected, $result); } public function testToStringNameNamespaceAttr() { $xmlobj = new XMPPHP_XMLObj('testName', 'testNameSpace', array('attr1'=>'valA', 'attr2'=>'valB')); $expected = ""; $result = $xmlobj->toString(); $this->assertSame($expected, $result); } public function testToStringNameNamespaceData() { $xmlobj = new XMPPHP_XMLObj('testName', 'testNameSpace', array(), 'I am test data'); $expected = "I am test data"; $result = $xmlobj->toString(); $this->assertSame($expected, $result); } public function testToStringNameNamespaceSub() { $xmlobj = new XMPPHP_XMLObj('testName', 'testNameSpace'); $sub1 = new XMPPHP_XMLObj('subName', 'subNameSpace'); $xmlobj->subs = array($sub1); $expected = ""; $result = $xmlobj->toString(); $this->assertSame($expected, $result); } }