From: Renan Rodrigo <renanrodrigo@canonical.com>
Date: Tue, 5 Aug 2025 15:45:30 -0300
Subject: [Tests] Adapt testAddHtmlContentWithErrors to be HTML5 compliant

The new libxml2 uses HTML5 by default, and the current snippet used to test
invalid HTML is HTML5-valid. This commit changes the snippet to be invalid both
for HTML4 and HTML5, so the test passes.

Origin: upstream, https://github.com/symfony/symfony/commit/3c0410b556608ec3e9b23388cebefd08af4b9fe8
Bug-Debian: https://bugs.debian.org/1107547
Bug: https://github.com/symfony/symfony/pull/61347
---
 src/Symfony/Component/DomCrawler/Tests/NativeParserCrawlerTest.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Symfony/Component/DomCrawler/Tests/NativeParserCrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/NativeParserCrawlerTest.php
index c61d935..6bd13d3 100644
--- a/src/Symfony/Component/DomCrawler/Tests/NativeParserCrawlerTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/NativeParserCrawlerTest.php
@@ -29,7 +29,8 @@ class NativeParserCrawlerTest extends AbstractCrawlerTestCase
     <head>
     </head>
     <body>
-        <nav><a href="#"><a href="#"></nav>
+        <div><a href="#"></div>
+    </body>
     </body>
 </html>
 EOF
@@ -37,7 +38,7 @@ EOF
 
         $errors = libxml_get_errors();
         $this->assertCount(1, $errors);
-        $this->assertEquals("Tag nav invalid\n", $errors[0]->message);
+        $this->assertEquals("Unexpected end tag : body\n", $errors[0]->message);
 
         libxml_clear_errors();
         libxml_use_internal_errors($internalErrors);
