From 8d7365b6f009ba43e305d6459013ac4fbed7c606 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sat, 10 Aug 2024 19:43:21 +0200
Subject: [PATCH] Fix GH-15331: dom: Element::$substitutedNodeValue test failed
Bug in libxml, amend test to accept both outputs.
---
NEWS | 1 +
.../tests/modern/extensions/Element_substitutedNodeValue.phpt | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index ea782aef3e4..50e8e89758c 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ PHP NEWS
(html5_serializer)). (nielsdos)
. Deprecated DOM_PHP_ERR constant. (nielsdos)
. Removed DOMImplementation::getFeature(). (nielsdos)
+ . Fixed bug GH-15331 (Element::$substitutedNodeValue test failed). (nielsdos)
- Hash:
. Deprecated passing incorrect data types for options to ext/hash functions.
diff --git a/ext/dom/tests/modern/extensions/Element_substitutedNodeValue.phpt b/ext/dom/tests/modern/extensions/Element_substitutedNodeValue.phpt
index f8f1d6d122e..9c84ab1ca03 100644
--- a/ext/dom/tests/modern/extensions/Element_substitutedNodeValue.phpt
+++ b/ext/dom/tests/modern/extensions/Element_substitutedNodeValue.phpt
@@ -23,7 +23,7 @@ var_dump($dom->documentElement->nodeValue); // Should always be NULL for element
echo $dom->saveXML(), "\n";
?>
---EXPECT--
+--EXPECTF--
string(1) "1"
NULL
@@ -35,4 +35,4 @@ NULL
string(0) ""
NULL
-
+%r(<\/root>|)%r