Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (arrayOfStructsTest)
3
--SKIPIF--
4
<?php
5
if (!function_exists('xmlrpc_server_create')) {
6
    print "Skip XMLRPC extension unavailable";
7
}
8
if (!function_exists('curl_init')) {
9
    print "Skip CURL extension unavailable";
10
}
11
?>
12
--FILE--
13
<?php
14
set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path());
15
require_once 'XML/RPC2/Client.php';
16
$options = array(
17
	'debug' => false,
18
	'backend' => 'Xmlrpcext',
19
	'prefix' => 'validator1.'
20
);
21
$client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options);
22
$arg = array(
23
    array(
24
        'moe' => 5,
25
        'larry' => 6,
26
        'curly' => 8
27
    ),
28
    array(
29
        'moe' => 5,
30
        'larry' => 2,
31
        'curly' => 4
32
    ),
33
    array(
34
        'moe' => 0,
35
        'larry' => 1,
36
        'curly' => 12
37
    )
38
);
39
$result = $client->arrayOfStructsTest($arg);
40
var_dump($result);
41
 
42
?>
43
--EXPECT--
44
int(24)