summaryrefslogtreecommitdiff
path: root/ext/simplexml
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2015-05-30 18:09:51 +0200
committerAnatol Belski <ab@php.net>2015-05-31 21:27:02 +0200
commite44b040faf0bf41eaf1b7ff975b460d10fc1b401 (patch)
treeaab608e1288b8e2a217bf4b3f78c00815dc3d0f7 /ext/simplexml
parent1e9522021ab147d7986fbd93dcd3eafae2b24620 (diff)
downloadphp-git-e44b040faf0bf41eaf1b7ff975b460d10fc1b401.tar.gz
recovered original meaning of SXE xpath test
Diffstat (limited to 'ext/simplexml')
-rw-r--r--ext/simplexml/tests/SimpleXMLElement_xpath.phpt9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt
index 4a613c2e51..fb7e6e90f0 100644
--- a/ext/simplexml/tests/SimpleXMLElement_xpath.phpt
+++ b/ext/simplexml/tests/SimpleXMLElement_xpath.phpt
@@ -2,7 +2,14 @@
Testing xpath() with invalid XML
--FILE--
<?php
-$xml = @simplexml_load_string("XXXXXXX^",$x,0x6000000000000001);
+// gracefully recover from parsing of invalid XML; not available in PHP
+const XML_PARSE_RECOVER = 1;
+
+// we're not interested in checking concrete warnings regarding invalid XML
+$xml = @simplexml_load_string("XXXXXXX^", 'SimpleXMLElement', XML_PARSE_RECOVER);
+
+// $xml is supposed to hold a SimpleXMLElement, but not FALSE/NULL
var_dump($xml->xpath("BBBB"));
+?>
--EXPECT--
bool(false)