server = new XmlRpcServer(true); } function testFullArgs() { $request = << wiki.twoArgWithDefaultArg arg1 arg2 EOD; $expected = << arg1 arg2 EOD; $_SERVER['CONTENT_TYPE'] = 'text/xml'; $this->server->serve($request); $this->assertXmlStringEqualsXmlString(trim($expected), trim($this->server->output)); } function testDefaultArgs() { $request = << wiki.twoArgWithDefaultArg arg1 EOD; $expected = << arg1 default EOD; $_SERVER['CONTENT_TYPE'] = 'text/xml'; $this->server->serve($request); $this->assertXmlStringEqualsXmlString(trim($expected), trim($this->server->output)); } function testStructResponse() { $request = << wiki.getStructuredData EOD; $expected = << type internal page wiki:dokuwiki href https://www.dokuwiki.org/wiki:dokuwiki EOD; $_SERVER['CONTENT_TYPE'] = 'text/xml'; $this->server->serve($request); $this->assertXmlStringEqualsXmlString(trim($expected), trim($this->server->output)); } }