1--TEST-- 2XMLRPCext Backend XML-RPC client against phpxmlrpc validator1 (countTheEntities) 3--SKIPIF-- 4<?php 5if (!function_exists('xmlrpc_server_create')) { 6 print "Skip XMLRPC extension unavailable"; 7} 8if (!function_exists('curl_init')) { 9 print "Skip CURL extension unavailable"; 10} 11?> 12--FILE-- 13<?php 14set_include_path(realpath(dirname(__FILE__) . '/../../../../') . PATH_SEPARATOR . get_include_path()); 15require_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$string = "foo <<< bar '> && '' #fo>o \" bar"; 23$result = $client->countTheEntities($string); 24var_dump($result['ctLeftAngleBrackets']); 25var_dump($result['ctRightAngleBrackets']); 26var_dump($result['ctAmpersands']); 27var_dump($result['ctApostrophes']); 28var_dump($result['ctQuotes']); 29 30 31?> 32--EXPECT-- 33int(3) 34int(2) 35int(2) 36int(3) 37int(1) 38