diff options
author | Sean Finney <seanius@debian.org> | 2009-06-23 22:03:36 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2009-06-23 22:03:36 +0200 |
commit | c785001d106afb1d4eb98c811a1bf2e4e06065bf (patch) | |
tree | 5bae23cee6270614b53b86eea95a6725d1c30e4e /ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt | |
parent | cd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f (diff) | |
download | php-c785001d106afb1d4eb98c811a1bf2e4e06065bf.tar.gz |
Imported Upstream version 5.2.10.dfsg.1upstream/5.2.10.dfsg.1
Diffstat (limited to 'ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt')
-rw-r--r-- | ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt new file mode 100644 index 000000000..f15c08d32 --- /dev/null +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt @@ -0,0 +1,32 @@ +--TEST-- +Check xsltprocessor::registerPHPFunctions with string called multiple times +--DESCRIPTION-- +When being called multiple times with a stringular function name only, +registerPHPFunctions adds the new function to the allowed parameter +list - it does not replace the old function. +--SKIPIF-- +<?php + if (!extension_loaded('xsl')) { + die("skip\n"); + } +?> +--FILE-- +<?php +include dirname(__FILE__) .'/prepare.inc'; +$phpfuncxsl = new domDocument(); +$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +if(!$phpfuncxsl) { + echo "Error while parsing the xsl document\n"; + exit; +} +$proc->importStylesheet($phpfuncxsl); +var_dump($proc->registerPHPFunctions('ucwords')); +var_dump($proc->registerPHPFunctions('strpos')); +var_dump($proc->transformToXml($dom)); +--EXPECTF-- +NULL +NULL +string(18) "This Is An Example" +--CREDITS-- +Christian Weiske, cweiske@php.net +PHP Testfest Berlin 2009-05-09 |