Annotation of embedaddon/php/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Check xsltprocessor::registerPHPFunctions and a undefined php function
                      3: --DESCRIPTION--
                      4: The XSL script tries to call a php function that is not defined
                      5: --SKIPIF--
                      6: <?php 
                      7:         if (!extension_loaded('xsl')) {
                      8:                 die("skip\n");
                      9:         }
                     10: ?>
                     11: --FILE--
                     12: <?php
                     13: include dirname(__FILE__) .'/prepare.inc';
                     14: $phpfuncxsl = new domDocument();
                     15: $phpfuncxsl->load(dirname(__FILE__)."/phpfunc-undef.xsl");
                     16: if(!$phpfuncxsl) {
                     17:   echo "Error while parsing the xsl document\n";
                     18:   exit;
                     19: }
                     20: $proc->importStylesheet($phpfuncxsl);
                     21: var_dump($proc->registerPHPFunctions());
                     22: var_dump($proc->transformToXml($dom));
                     23: --EXPECTF--
                     24: NULL
                     25: 
                     26: Warning: XSLTProcessor::transformToXml(): Unable to call handler undefinedfunc() in %s on line %d
                     27: NULL
                     28: --CREDITS--
                     29: Christian Weiske, cweiske@php.net
                     30: PHP Testfest Berlin 2009-05-09

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>