2
Test xml_parser_set_option() function : error conditions
5
if (!extension_loaded("xml")) {
6
print "skip - XML extension not loaded";
11
/* Prototype : proto int xml_parser_set_option(resource parser, int option, mixed value)
12
* Description: Set options in an XML parser
13
* Source code: ext/xml/xml.c
17
echo "*** Testing xml_parser_set_option() : error conditions ***\n";
20
//Test xml_parser_set_option with one more than the expected number of arguments
21
echo "\n-- Testing xml_parser_set_option() function with more than expected no. of arguments --\n";
26
var_dump( xml_parser_set_option(null, $option, $value, $extra_arg) );
28
// Testing xml_parser_set_option with one less than the expected number of arguments
29
echo "\n-- Testing xml_parser_set_option() function with less than expected no. of arguments --\n";
32
var_dump( xml_parser_set_option(null, $option) );
37
*** Testing xml_parser_set_option() : error conditions ***
39
-- Testing xml_parser_set_option() function with more than expected no. of arguments --
41
Warning: xml_parser_set_option() expects exactly 3 parameters, 4 given in %s on line %d
44
-- Testing xml_parser_set_option() function with less than expected no. of arguments --
46
Warning: xml_parser_set_option() expects exactly 3 parameters, 2 given in %s on line %d