Unfortunately, the test bot doesn’t allow testing with the latest dev branch (10.2.x) for some reason, but I see some test fails using that:

  • In 10.2, </code> is missing so our <code>SearchApiDbUpdate8102Test fails.
  • Also, #2441811: Upgrade filter system to HTML5 changed \Drupal\Component\Utility\Html::serialize() to convert self-closing tags to normal opening tags (e.g., <img /> becomes <img>), leading to wrong nesting and, therefore, failures in HtmlFilterTest.
CommentFileSizeAuthor
#3 3405649-2--fix_tests_d102.patch2.55 KBdrunken monkey

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Title: Fix test failures » Fix test failures against Drupal 10.2
Issue summary: View changes
Status: Active » Needs review

The attached patch should fix the tests. (Not really possible to test with the bot, unfortunately.)

The fix for HtmlFilter is, of course, less than ideal – since the new version of the method was the problem, I simply copied the old one. I felt a much more elegant way would have been to avoid serializing the DOM object again and instead iterating through its contents, building our text tokens from that. However, iterating over the contents of a \DOMDocument object is apparently not that simple, so I opted for this solution instead. Other suggestions very much welcome!

drunken monkey’s picture

StatusFileSize
new2.55 KB

  • drunken monkey committed 63b2f8c1 on 8.x-1.x
    Issue #3405649 by drunken monkey: Fixed test failures against Drupal 10....
drunken monkey’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.