diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-09-30 01:31:06 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-09-30 01:31:06 +0000 |
commit | 77726c734e311837c49a4ae898c5f82c622f0161 (patch) | |
tree | fbf39ef2df948b539bd4de4a4c13eb8a62f09317 /ext/xml | |
parent | 40802a758466958c02b683b4d278fe85e4db33aa (diff) | |
download | php-git-77726c734e311837c49a4ae898c5f82c622f0161.tar.gz |
Add regression test for bug #25666
Diffstat (limited to 'ext/xml')
-rw-r--r-- | ext/xml/tests/bug25666.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/xml/tests/bug25666.phpt b/ext/xml/tests/bug25666.phpt new file mode 100644 index 0000000000..5e95b31b17 --- /dev/null +++ b/ext/xml/tests/bug25666.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #25666 (XML namespaces broken in libxml-based SAX interface) +--FILE-- +<?php +function start_elem($parser,$name,$attribs) { + var_dump($name); +} +function end_elem() +{ +} + +$xml = <<<HERE +<foo:a xmlns:foo="http://example.com/foo" + xmlns:bar="http://example.com/bar" + xmlns:baz="http://example.com/baz"> + <bar:b /> + <baz:c /> +</foo> +HERE; + +$parser = xml_parser_create_ns("ISO-8859-1","@"); +xml_set_element_handler($parser,'start_elem','end_elem'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +xml_parse($parser, $xml); +xml_parser_free($parser); +?> +--EXPECT-- +string(24) "http://example.com/foo@a" +string(24) "http://example.com/bar@b" +string(24) "http://example.com/baz@c" |