From b24fedbd24cef13dab0198f154db4fdaf3c9b3eb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 31 May 2015 21:28:44 +0200 Subject: [PATCH] split the original test to check behaviour diff on 32- and 64-bit --- .../tests/SimpleXMLElement_xpath_1.phpt | 22 +++++++++++++++++++ .../tests/SimpleXMLElement_xpath_2.phpt | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ext/simplexml/tests/SimpleXMLElement_xpath_1.phpt create mode 100644 ext/simplexml/tests/SimpleXMLElement_xpath_2.phpt diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath_1.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath_1.phpt new file mode 100644 index 0000000000..bf7e0318c9 --- /dev/null +++ b/ext/simplexml/tests/SimpleXMLElement_xpath_1.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing xpath() with invalid XML +--SKIPIF-- + +--FILE-- +xpath("BBBB")); +?> +--EXPECTF-- +Notice: Undefined variable: x in %s on line %d + +Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in %s on line %d + +Warning: simplexml_load_string(): XXXXXXX^ in %s on line %d + +Warning: simplexml_load_string(): ^ in %s on line %d + +Fatal error: Call to a member function xpath() on a non-object in %s on line %d diff --git a/ext/simplexml/tests/SimpleXMLElement_xpath_2.phpt b/ext/simplexml/tests/SimpleXMLElement_xpath_2.phpt new file mode 100644 index 0000000000..78f8b3e59f --- /dev/null +++ b/ext/simplexml/tests/SimpleXMLElement_xpath_2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing xpath() with invalid XML +--SKIPIF-- + +--FILE-- +xpath("BBBB")); +?> +--EXPECTF-- +Notice: Undefined variable: x in %s on line %d + +Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in %s on line %d + +Warning: simplexml_load_string(): XXXXXXX^ in %s on line %d + +Warning: simplexml_load_string(): ^ in %s on line %d +bool(false) + -- 2.49.0