Annotation of embedaddon/php/ext/xml/tests/xml_parser_create_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test xml_parser_create() function : error conditions
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded("xml")) {
! 6: print "skip - XML extension not loaded";
! 7: }
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11: /* Prototype : proto resource xml_parser_create([string encoding])
! 12: * Description: Create an XML parser
! 13: * Source code: ext/xml/xml.c
! 14: * Alias to functions:
! 15: */
! 16:
! 17: echo "*** Testing xml_parser_create() : error conditions ***\n";
! 18:
! 19:
! 20: //Test xml_parser_create with one more than the expected number of arguments
! 21: echo "\n-- Testing xml_parser_create() function with more than expected no. of arguments --\n";
! 22: $encoding = 'utf-8';
! 23: $extra_arg = 10;
! 24: var_dump( xml_parser_create($encoding, $extra_arg) );
! 25:
! 26: echo "Done";
! 27: ?>
! 28: --EXPECTF--
! 29: *** Testing xml_parser_create() : error conditions ***
! 30:
! 31: -- Testing xml_parser_create() function with more than expected no. of arguments --
! 32:
! 33: Warning: xml_parser_create() expects at most 1 parameter, 2 given in %s on line %d
! 34: bool(false)
! 35: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>