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