Annotation of embedaddon/php/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Check xsltprocessor::registerPHPFunctions and a non-string function in xsl
        !             3: --DESCRIPTION--
        !             4: The XSL script tries to call a php function that is not a string which
        !             5: is expected to fail
        !             6: --SKIPIF--
        !             7: <?php 
        !             8:         if (!extension_loaded('xsl')) {
        !             9:                 die("skip\n");
        !            10:         }
        !            11: ?>
        !            12: --FILE--
        !            13: <?php
        !            14: include dirname(__FILE__) .'/prepare.inc';
        !            15: $phpfuncxsl = new domDocument();
        !            16: $phpfuncxsl->load(dirname(__FILE__)."/phpfunc-nostring.xsl");
        !            17: if(!$phpfuncxsl) {
        !            18:   echo "Error while parsing the xsl document\n";
        !            19:   exit;
        !            20: }
        !            21: $proc->importStylesheet($phpfuncxsl);
        !            22: var_dump($proc->registerPHPFunctions());
        !            23: var_dump($proc->transformToXml($dom));
        !            24: --EXPECTF--
        !            25: NULL
        !            26: 
        !            27: Warning: XSLTProcessor::transformToXml(): Handler name must be a string in %s on line %d
        !            28: 
        !            29: Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation failed in %s on line %d
        !            30: 
        !            31: Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d
        !            32: 
        !            33: Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d
        !            34: NULL
        !            35: --CREDITS--
        !            36: Christian Weiske, cweiske@php.net
        !            37: PHP Testfest Berlin 2009-05-09

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