File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
xsl /
tests /
xsltprocessor_registerPHPFunctions-funcundef.phpt
Revision
1.1.1.2 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:41 2012 UTC (12 years, 8 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,
HEAD
php 5.4.3+patches
--TEST--
Check xsltprocessor::registerPHPFunctions and a undefined php function
--DESCRIPTION--
The XSL script tries to call a php function that is not defined
--SKIPIF--
<?php
if (!extension_loaded('xsl')) {
die("skip\n");
}
?>
--FILE--
<?php
include dirname(__FILE__) .'/prepare.inc';
$phpfuncxsl = new domDocument();
$phpfuncxsl->load(dirname(__FILE__)."/phpfunc-undef.xsl");
if(!$phpfuncxsl) {
echo "Error while parsing the xsl document\n";
exit;
}
$proc->importStylesheet($phpfuncxsl);
var_dump($proc->registerPHPFunctions());
var_dump($proc->transformToXml($dom));
--EXPECTF--
NULL
Warning: XSLTProcessor::transformToXml(): Unable to call handler undefinedfunc() in %s on line %d
NULL
--CREDITS--
Christian Weiske, cweiske@php.net
PHP Testfest Berlin 2009-05-09
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>