From 3375ec39fd94724bc0f5c15cf88c33b9cabce3d6 Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Thu, 20 Jul 2023 08:19:42 +0200 Subject: [PATCH] Fix testsuite for libxml 2.11 --- tests/Xml/Dom/Manipulator/Node/RenameTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/Xml/Dom/Manipulator/Node/RenameTest.php b/tests/Xml/Dom/Manipulator/Node/RenameTest.php index d1dd899..83f41bf 100644 --- a/tests/Xml/Dom/Manipulator/Node/RenameTest.php +++ b/tests/Xml/Dom/Manipulator/Node/RenameTest.php @@ -9,6 +9,7 @@ use VeeWee\Xml\Dom\Document; use VeeWee\Xml\Exception\RuntimeException; use function VeeWee\Xml\Dom\Builder\xmlns_attribute; +use function VeeWee\Xml\Dom\Configurator\comparable; use function VeeWee\Xml\Dom\Locator\document_element; use function VeeWee\Xml\Dom\Manipulator\Node\remove_namespace; use function VeeWee\Xml\Dom\Manipulator\Node\rename; @@ -111,7 +112,13 @@ public function test_it_can_rename_an_element_and_drop_prefix(): void $result = rename($node, 'thing'); - static::assertXmlStringEqualsXmlString($doc->toXmlString(), ''); + static::assertSame( + Document::fromUnsafeDocument($doc->map(comparable()))->toXmlString(), + Document::fromXmlString( + '', + comparable() + )->toXmlString(), + ); static::assertSame($doc->xpath(namespaces(['a' => 'http://ok']))->querySingle('//a:thing'), $result); }