cvs: pear /XML_RPC2/tests/XML_RPC2/phpBackend/client okFromPEAR.phpt okFromUserLandGetCurrentTime.phpt phpxmlrpcValidator1ArrayOfStructsTest.phpt
phpxmlrpcValidator1CountTheEntities.phpt phpxmlrpcValidator1EasyStructTest.phpt phpxmlrpcValidator1EchoStructTest.phpt
phpxmlrpcValidator1ManyTypesTest.phpt phpxmlrpcValidator1ModerateSizeArrayCheck.phpt phpxmlrpcValidator1NestedStructTest.phpt
phpxmlrpcValidator1SimpleStructReturnTest.phpt
| From: | Fabien MARTY | Date: | Tue, 17 Jan 2006 22:19:46 +0000 |
| Subject: | cvs: pear /XML_RPC2/tests/XML_RPC2/phpBackend/client okFromPEAR.phpt okFromUserLandGetCurrentTime.phpt phpxmlrpcValidator1ArrayOfStructsTest.phpt phpxmlrpcValidator1CountTheEntities.phpt phpxmlrpcValidator1EasyStructTest.phpt phpxmlrpcValidator1EchoStructTest.phpt phpxmlrpcValidator1ManyTypesTest.phpt phpxmlrpcValidator1ModerateSizeArrayCheck.phpt phpxmlrpcValidator1NestedStructTest.phpt phpxmlrpcValidator1SimpleStructReturnTest.phpt |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-37618@lists.php.net to get a copy of this message | ||
fab Tue Jan 17 22:19:46 2006 UTC
Added files:
/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client okFromPEAR.phpt
phpxmlrpcValidator1EchoStructTest.phpt
okFromUserLandGetCurrentTime.phpt
phpxmlrpcValidator1SimpleStructReturnTest.phpt
phpxmlrpcValidator1ModerateSizeArrayCheck.phpt
phpxmlrpcValidator1NestedStructTest.phpt
phpxmlrpcValidator1CountTheEntities.phpt
phpxmlrpcValidator1ArrayOfStructsTest.phpt
phpxmlrpcValidator1EasyStructTest.phpt
phpxmlrpcValidator1ManyTypesTest.phpt
Log:
first import
http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromPEAR.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromPEAR.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromPEAR.phpt --TEST-- XMLRPCext Backend XML-RPC client against pear.php.net XMLRPC server --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'package.' ); $client = XML_RPC2_Client::create('http://pear.php.net/xmlrpc.php', $options); $result = $client->info('XML_RPC2'); if (is_array($result)) { print $result['name'] . "\n"; } else { die('result is not an array !'); } ?> --EXPECT-- XML_RPC2 http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EchoStructTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EchoStructTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EchoStructTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (echoStructTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $arg = array( 'moe' => 5, 'larry' => 6, 'curly' => 8 ); $result = $client->echoStructTest($arg); var_dump($result); ?> --EXPECT-- array(3) { ["moe"]=> int(5) ["larry"]=> int(6) ["curly"]=> int(8) } http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromUserLandGetCurrentTime.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromUserLandGetCurrentTime.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromUserLandGetCurrentTime.phpt --TEST-- XMLRPCext Backend XML-RPC client against userland.com getCurrentTime XMLRPC server --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'currentTime.' ); $client = XML_RPC2_Client::create('http://time.xmlrpc.com/RPC2', $options); $result = $client->getCurrentTime(); if (!(is_object($result))) { die('result is not an object !'); } $timestamp = $result->timestamp; if (is_integer($timestamp)) { print "1\n"; } ?> --EXPECT-- 1 http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1SimpleStructReturnTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1SimpleStructReturnTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1SimpleStructReturnTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (simpleStructReturnTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $result = $client->simpleStructReturnTest(13); var_dump($result['times10']); var_dump($result['times100']); var_dump($result['times1000']); ?> --EXPECT-- int(130) int(1300) int(13000) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ModerateSizeArrayCheck.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ModerateSizeArrayCheck.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ModerateSizeArrayCheck.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (moderateSizeArrayCheck) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $tmp = array('foo'); for ($i = 0 ; $i<150 ; $i++) { $tmp[] = "bla bla bla"; } $tmp[] = "bar"; $result = $client->moderateSizeArrayCheck($tmp); echo($result . "\n"); ?> --EXPECT-- foobar http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1NestedStructTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1NestedStructTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1NestedStructTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (nestedStructTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $year1999 = array( '01' => array(), '02' => array(), '03' => array(), '04' => array(), '05' => array(), '06' => array(), '07' => array(), '08' => array(), '09' => array(), '10' => array(), '11' => array(), '12' => array() ); $year2001 = $year1999; $year2000 = $year1999; $year2000['04']['01'] = array( 'moe' => 12, 'larry' => 14, 'curly' => 9 ); $index1999 = '1999 '; $index2000 = '2000 '; $index2001 = '2001 '; $cal = array(); $cal[(string) $index1999] = $year1999; $cal[(string) $index2000] = $year2000; $cal[(string) $index2001] = $year2001; var_dump($cal); // TODO : not working !!! because struct is seen as an array because of numeric indexes // TODO : no solution for now ! $result = $client->nestedStructTest($cal); var_dump($result); ?> --EXPECT-- int(35) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1CountTheEntities.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1CountTheEntities.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1CountTheEntities.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (countTheEntities) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $string = "foo <<< bar '> && '' #fo>o \" bar"; $result = $client->countTheEntities($string); var_dump($result['ctLeftAngleBrackets']); var_dump($result['ctRightAngleBrackets']); var_dump($result['ctAmpersands']); var_dump($result['ctApostrophes']); var_dump($result['ctQuotes']); ?> --EXPECT-- int(3) int(2) int(2) int(3) int(1) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ArrayOfStructsTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ArrayOfStructsTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ArrayOfStructsTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (arrayOfStructsTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $arg = array( array( 'moe' => 5, 'larry' => 6, 'curly' => 8 ), array( 'moe' => 5, 'larry' => 2, 'curly' => 4 ), array( 'moe' => 0, 'larry' => 1, 'curly' => 12 ) ); $result = $client->arrayOfStructsTest($arg); var_dump($result); ?> --EXPECT-- int(24) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EasyStructTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EasyStructTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EasyStructTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (easyStructTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $arg = array( 'moe' => 5, 'larry' => 6, 'curly' => 8 ); $result = $client->easyStructTest($arg); var_dump($result); ?> --EXPECT-- int(19) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ManyTypesTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ManyTypesTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ManyTypesTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (manyTypesTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; require_once 'XML/RPC2/Value.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $tmp = "20060116T19:14:03"; $time = XML_RPC2_Value::createFromNative($tmp, 'datetime'); $base64 = XML_RPC2_Value::createFromNative('foobar', 'base64'); $result = $client->manyTypesTest(1, true, 'foo', 3.14159, $time, $base64); var_dump($result[0]); var_dump($result[1]); var_dump($result[2]); var_dump($result[3]); var_dump($result[4]->scalar); var_dump($result[4]->xmlrpc_type); var_dump($result[4]->timestamp); var_dump($result[5]->scalar); var_dump($result[5]->xmlrpc_type); ?> --EXPECT-- int(1) bool(true) string(3) "foo" float(3.14159) string(17) "20060116T19:14:03" string(8) "datetime" int(1137435243) string(6) "foobar" string(6) "base64"
http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromPEAR.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromPEAR.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromPEAR.phpt --TEST-- XMLRPCext Backend XML-RPC client against pear.php.net XMLRPC server --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'package.' ); $client = XML_RPC2_Client::create('http://pear.php.net/xmlrpc.php', $options); $result = $client->info('XML_RPC2'); if (is_array($result)) { print $result['name'] . "\n"; } else { die('result is not an array !'); } ?> --EXPECT-- XML_RPC2 http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EchoStructTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EchoStructTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EchoStructTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (echoStructTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $arg = array( 'moe' => 5, 'larry' => 6, 'curly' => 8 ); $result = $client->echoStructTest($arg); var_dump($result); ?> --EXPECT-- array(3) { ["moe"]=> int(5) ["larry"]=> int(6) ["curly"]=> int(8) } http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromUserLandGetCurrentTime.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromUserLandGetCurrentTime.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/okFromUserLandGetCurrentTime.phpt --TEST-- XMLRPCext Backend XML-RPC client against userland.com getCurrentTime XMLRPC server --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'currentTime.' ); $client = XML_RPC2_Client::create('http://time.xmlrpc.com/RPC2', $options); $result = $client->getCurrentTime(); if (!(is_object($result))) { die('result is not an object !'); } $timestamp = $result->timestamp; if (is_integer($timestamp)) { print "1\n"; } ?> --EXPECT-- 1 http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1SimpleStructReturnTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1SimpleStructReturnTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1SimpleStructReturnTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (simpleStructReturnTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $result = $client->simpleStructReturnTest(13); var_dump($result['times10']); var_dump($result['times100']); var_dump($result['times1000']); ?> --EXPECT-- int(130) int(1300) int(13000) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ModerateSizeArrayCheck.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ModerateSizeArrayCheck.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ModerateSizeArrayCheck.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (moderateSizeArrayCheck) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $tmp = array('foo'); for ($i = 0 ; $i<150 ; $i++) { $tmp[] = "bla bla bla"; } $tmp[] = "bar"; $result = $client->moderateSizeArrayCheck($tmp); echo($result . "\n"); ?> --EXPECT-- foobar http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1NestedStructTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1NestedStructTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1NestedStructTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (nestedStructTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $year1999 = array( '01' => array(), '02' => array(), '03' => array(), '04' => array(), '05' => array(), '06' => array(), '07' => array(), '08' => array(), '09' => array(), '10' => array(), '11' => array(), '12' => array() ); $year2001 = $year1999; $year2000 = $year1999; $year2000['04']['01'] = array( 'moe' => 12, 'larry' => 14, 'curly' => 9 ); $index1999 = '1999 '; $index2000 = '2000 '; $index2001 = '2001 '; $cal = array(); $cal[(string) $index1999] = $year1999; $cal[(string) $index2000] = $year2000; $cal[(string) $index2001] = $year2001; var_dump($cal); // TODO : not working !!! because struct is seen as an array because of numeric indexes // TODO : no solution for now ! $result = $client->nestedStructTest($cal); var_dump($result); ?> --EXPECT-- int(35) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1CountTheEntities.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1CountTheEntities.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1CountTheEntities.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (countTheEntities) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $string = "foo <<< bar '> && '' #fo>o \" bar"; $result = $client->countTheEntities($string); var_dump($result['ctLeftAngleBrackets']); var_dump($result['ctRightAngleBrackets']); var_dump($result['ctAmpersands']); var_dump($result['ctApostrophes']); var_dump($result['ctQuotes']); ?> --EXPECT-- int(3) int(2) int(2) int(3) int(1) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ArrayOfStructsTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ArrayOfStructsTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ArrayOfStructsTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (arrayOfStructsTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $arg = array( array( 'moe' => 5, 'larry' => 6, 'curly' => 8 ), array( 'moe' => 5, 'larry' => 2, 'curly' => 4 ), array( 'moe' => 0, 'larry' => 1, 'curly' => 12 ) ); $result = $client->arrayOfStructsTest($arg); var_dump($result); ?> --EXPECT-- int(24) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EasyStructTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EasyStructTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1EasyStructTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (easyStructTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $arg = array( 'moe' => 5, 'larry' => 6, 'curly' => 8 ); $result = $client->easyStructTest($arg); var_dump($result); ?> --EXPECT-- int(19) http://cvs.php.net/viewcvs.cgi/pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ManyTypesTest.phpt?view=markup&rev=1.1 Index: pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ManyTypesTest.phpt +++ pear/XML_RPC2/tests/XML_RPC2/phpBackend/client/phpxmlrpcValidator1ManyTypesTest.phpt --TEST-- XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (manyTypesTest) --FILE-- <?php set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); require_once 'XML/RPC2/Client.php'; require_once 'XML/RPC2/Value.php'; $options = array( 'debug' => false, 'backend' => 'Php', 'prefix' => 'validator1.' ); $client = XML_RPC2_Client::create('http://phpxmlrpc.sourceforge.net/server.php', $options); $tmp = "20060116T19:14:03"; $time = XML_RPC2_Value::createFromNative($tmp, 'datetime'); $base64 = XML_RPC2_Value::createFromNative('foobar', 'base64'); $result = $client->manyTypesTest(1, true, 'foo', 3.14159, $time, $base64); var_dump($result[0]); var_dump($result[1]); var_dump($result[2]); var_dump($result[3]); var_dump($result[4]->scalar); var_dump($result[4]->xmlrpc_type); var_dump($result[4]->timestamp); var_dump($result[5]->scalar); var_dump($result[5]->xmlrpc_type); ?> --EXPECT-- int(1) bool(true) string(3) "foo" float(3.14159) string(17) "20060116T19:14:03" string(8) "datetime" int(1137435243) string(6) "foobar" string(6) "base64"