From d6e70e705323a50b616ffee9402245ab97de3e4e Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Wed, 23 Apr 2025 17:44:23 +0200
Subject: [PATCH] Fix DOM tests for upcoming libxml2 serializer changes
DOM HTML serializer will be closer compliant to HTML5 in the next
libxml2 version, so the tests need to be adapted.
Ref: https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/309
Closes GH-18406.
---
ext/dom/tests/DOMElement_toggleAttribute.phpt | 6 +++---
ext/dom/tests/gh10234.phpt | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ext/dom/tests/DOMElement_toggleAttribute.phpt b/ext/dom/tests/DOMElement_toggleAttribute.phpt
index ed29be899da..b9e9989e1fe 100644
--- a/ext/dom/tests/DOMElement_toggleAttribute.phpt
+++ b/ext/dom/tests/DOMElement_toggleAttribute.phpt
@@ -87,7 +87,7 @@ echo "Checking toggled namespace:\n";
var_dump($dom->documentElement->getAttribute('xmlns:anotheron'));
?>
---EXPECT--
+--EXPECTF--
Invalid Character Error
--- Selected attribute tests (HTML) ---
bool(false)
@@ -95,10 +95,10 @@ bool(false)
bool(true)
-
+
bool(true)
-
+
bool(false)
diff --git a/ext/dom/tests/gh10234.phpt b/ext/dom/tests/gh10234.phpt
index 5edc8fc6c1f..11d39cd625a 100644
--- a/ext/dom/tests/gh10234.phpt
+++ b/ext/dom/tests/gh10234.phpt
@@ -55,7 +55,7 @@ $document->documentElement->textContent = "quote 'test'";
var_dump($document->documentElement->textContent);
var_dump($document->saveHTML());
?>
---EXPECT--
+--EXPECTF--
-- Attribute tests --
string(38) "
"
@@ -67,10 +67,10 @@ string(13) "hello & world"
string(50) "
"
string(9) "hi"
-string(54) "
+string(%d) "hi<\/b>")%r>
"
string(12) "quote "test""
-string(45) "
+string(%d) "
"
string(12) "quote 'test'"
string(45) "