| 1 |
lars |
1 |
--TEST--
|
|
|
2 |
PHP Backend XML-RPC client against python server returning normal response
|
|
|
3 |
--SKIPIF--
|
|
|
4 |
<?php
|
|
|
5 |
if (!function_exists('curl_init')) {
|
|
|
6 |
print "Skip no CURI extension available";
|
|
|
7 |
}
|
|
|
8 |
$handle = @fopen("http://python.xmlrpc2test.sergiocarvalho.com:8765", "r");
|
|
|
9 |
if (!$handle) {
|
|
|
10 |
echo("skip : The python XMLRPC server is not available !");
|
|
|
11 |
} else {
|
|
|
12 |
fclose($handle);
|
|
|
13 |
}
|
|
|
14 |
?>
|
|
|
15 |
--FILE--
|
|
|
16 |
<?php
|
|
|
17 |
set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path());
|
|
|
18 |
require_once 'XML/RPC2/Client.php';
|
|
|
19 |
require_once 'XML/RPC2/Backend.php';
|
|
|
20 |
XML_RPC2_Backend::setBackend('php');
|
|
|
21 |
$client = XML_RPC2_Client::create('http://python.xmlrpc2test.sergiocarvalho.com:8765', '', null);
|
|
|
22 |
var_dump($client->echo('World'));
|
|
|
23 |
?>
|
|
|
24 |
--EXPECT--
|
|
|
25 |
string(5) "World"
|