1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<?php
rcs_id('$Id: XmlRpcTest.php,v 1.2 2007/05/27 18:56:16 rurban Exp $');
/* Copyright (C) 2007 Reini Urban
*/
require_once 'lib/XmlRpcClient.php';
require_once 'PHPUnit.php';
class XmlRpcTest extends phpwiki_TestCase {
function testSelfVersion() {
$v = wiki_xmlrpc_post("wiki.getRPCVersionSupported");
$this->assertTrue(gettype($v), 'int');
$this->assertEquals($v, WIKI_XMLRPC_VERSION);
}
function testSelfAPI_v1() {
$v = wiki_xmlrpc_post("wiki.getRPCVersionSupported");
$this->assertTrue($v >= 1);
}
/*
function testSelfAPI_v2() {
$v = wiki_xmlrpc_post("wiki.getRPCVersionSupported");
$this->assertTrue($v >= 2);
// struct getAttachment( string localpath )
}
*/
/*
function testSelfAPI_private() {
// struct getUploadedFileInfo( string localpath )
// boolean wiki.mailPasswordToUser ( username )
// array wiki.titleSearch(String substring [, String option = "0"])
// array wiki.listPlugins()
// String wiki.getPluginSynopsis(String plugin)
// array wiki.listRelations([ Integer option = 1 ])
// array wiki.callPlugin(String name, String args)
$this->assertTrue(true);
}
function testSelfAPI_planned() {
// String pingback.ping(String sourceURI, String targetURI)
// boolean wiki.rssPleaseNotify ( notifyProcedure, port, path, protocol, urlList )
$this->assertTrue(true);
}
*/
}
// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
// End:
?>
|