Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
PHP Backend XML-RPC client against phpxmlrpc validator1 (nestedStructTest)
3
--SKIPIF--
4
<?php
5
if (!function_exists('curl_init')) {
6
    print "Skip no CURI extension available";
7
}
8
?>
9
--FILE--
10
<?php
11
set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path());
12
require_once 'XML/RPC2/Client.php';
13
$options = array(
14
	'debug' => false,
15
	'backend' => 'Php',
16
	'prefix' => 'validator1.'
17
);
18
$client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options);
19
 
20
$year1999 = array(
21
  '04' => array()
22
);
23
$year2001 = $year1999;
24
$year2000 = $year1999;
25
$year2000['04']['01'] = array(
26
	'moe' => 12,
27
	'larry' => 14,
28
	'curly' => 9
29
);
30
 
31
$index1999 = '1999 ';
32
$index2000 = '2000 ';
33
$index2001 = '2001 ';
34
$cal = array();
35
$cal['1999'] = $year1999;
36
$cal['2000'] = $year2000;
37
$cal['2001'] = $year2001;
38
 
39
require_once('XML/RPC2/Value.php');
40
$cal = XML_RPC2_Value::createFromNative($cal, 'struct');
41
$result = $client->nestedStructTest($cal);
42
var_dump($result);
43
 
44
?>
45
--EXPECT--
46
int(35)