File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
xsl /
tests /
xsltprocessor_registerPHPFunctions-string-multiple.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:05 2012 UTC (12 years, 4 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Check xsltprocessor::registerPHPFunctions with string called multiple times
3: --DESCRIPTION--
4: When being called multiple times with a stringular function name only,
5: registerPHPFunctions adds the new function to the allowed parameter
6: list - it does not replace the old function.
7: --SKIPIF--
8: <?php
9: if (!extension_loaded('xsl')) {
10: die("skip\n");
11: }
12: ?>
13: --FILE--
14: <?php
15: include dirname(__FILE__) .'/prepare.inc';
16: $phpfuncxsl = new domDocument();
17: $phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl");
18: if(!$phpfuncxsl) {
19: echo "Error while parsing the xsl document\n";
20: exit;
21: }
22: $proc->importStylesheet($phpfuncxsl);
23: var_dump($proc->registerPHPFunctions('ucwords'));
24: var_dump($proc->registerPHPFunctions('strpos'));
25: var_dump($proc->transformToXml($dom));
26: --EXPECTF--
27: NULL
28: NULL
29: string(18) "This Is An Example"
30: --CREDITS--
31: Christian Weiske, cweiske@php.net
32: PHP Testfest Berlin 2009-05-09
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>