/** * Tests RPC_Client_XMLRPC->getExtraInfo() */ public function testGetExtraInfo() { $GLOBALS['__xmlrpc_output'] = xmlrpc_encode_request(null, 10); $sxml = new SimpleXMLElement(xmlRPC_encode("test xyz")); $info = "Test extra info\n<extraInfo><type>test_info</type>" . $sxml->param->value->asXML() . "</extraInfo>"; $this->stream->expects($this->any())->method('getExtraInfo')->will($this->returnValue($info)); $this->RPC_Client_XMLRPC->getInterface()->test(); $this->assertEquals($info, $this->RPC_Client_XMLRPC->getExtraInfo('_raw_')); $this->assertEquals(array((object) array('type' => '_raw_', 'value' => $info), (object) array('type' => 'test_info', 'value' => "test xyz")), $this->RPC_Client_XMLRPC->getExtraInfo()); }
/** * Return fault as XMLRPC encoded string * * @return string */ public function encode() { return xmlRPC_encode($this); }