Issue #3397882 by poker10, andypost, joseph.olstad: [D7 PHP 8.3] TextSummaryTestCase::testLength() fails on some libxml versions

7.x
mcdruid 2024-12-03 13:54:43 +00:00
parent 8f0cd6880f
commit 2823495799
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -377,6 +377,15 @@ class TextSummaryTestCase extends DrupalWebTestCase {
// Test text_summary() for different sizes.
for ($i = 0; $i <= 37; $i++) {
$this->callTextSummary($text, $expected[$i], NULL, $i);
// libxml2 library changed parsing behavior on version 2.9.14. Skip
// specific edge-case testing for all further versions.
// @see https://gitlab.gnome.org/GNOME/libxml2/-/issues/474
// @see https://www.drupal.org/project/drupal/issues/3397882
if ($i == 1 && defined('LIBXML_VERSION') && LIBXML_VERSION >= 20914) {
continue;
}
$this->callTextSummary($text, $expected_lb[$i], 'plain_text', $i);
$this->callTextSummary($text, $expected_lb[$i], 'filtered_html', $i);
}