Skip to content

Commit

Permalink
Fix testsuite for libxml 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Jul 20, 2023
1 parent 24412da commit 3375ec3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/Xml/Dom/Manipulator/Node/RenameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -111,7 +112,13 @@ public function test_it_can_rename_an_element_and_drop_prefix(): void

$result = rename($node, 'thing');

static::assertXmlStringEqualsXmlString($doc->toXmlString(), '<hello><thing foo="bar" xmlns="http://ok" xmlns:whatever="http://whatever" /></hello>');
static::assertSame(
Document::fromUnsafeDocument($doc->map(comparable()))->toXmlString(),
Document::fromXmlString(
'<hello><thing xmlns="http://ok" xmlns:a="http://ok" xmlns:whatever="http://whatever" a:foo="bar"/></hello>',
comparable()
)->toXmlString(),
);
static::assertSame($doc->xpath(namespaces(['a' => 'http://ok']))->querySingle('//a:thing'), $result);
}

Expand Down

0 comments on commit 3375ec3

Please sign in to comment.