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 (countTheEntities)
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
$string = "foo <<< bar '> && '' #fo>o \" bar";
20
$result = $client->countTheEntities($string);
21
var_dump($result['ctLeftAngleBrackets']);
22
var_dump($result['ctRightAngleBrackets']);
23
var_dump($result['ctAmpersands']);
24
var_dump($result['ctApostrophes']);
25
var_dump($result['ctQuotes']);
26
 
27
 
28
?>
29
--EXPECT--
30
int(3)
31
int(2)
32
int(2)
33
int(3)
34
int(1)