diff options
Diffstat (limited to 'modules/search/search.test')
-rw-r--r-- | modules/search/search.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/search/search.test b/modules/search/search.test index 38bb0a74c..ca1dd24a3 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -1599,6 +1599,12 @@ class SearchExcerptTestCase extends DrupalUnitTestCase { $result = preg_replace('| +|', ' ', search_excerpt('nothing', $entities)); $this->assertFalse(strpos($result, '&'), 'Entities are not present in excerpt'); $this->assertTrue(strpos($result, 'í') > 0, 'Entities are converted in excerpt'); + + // The node body that will produce this rendered $text is: + // 123456789 HTMLTest +123456789+‘ +‘ +‘ +‘ +12345678 +‘ +‘ +‘ ‘ + $text = "<div class=\"field field-name-body field-type-text-with-summary field-label-hidden\"><div class=\"field-items\"><div class=\"field-item even\" property=\"content:encoded\"><p>123456789 HTMLTest +123456789+‘ +‘ +‘ +‘ +12345678 +‘ +‘ +‘ ‘</p>\n</div></div></div> "; + $result = search_excerpt('HTMLTest', $text); + $this->assertFalse(empty($result), 'Rendered Multi-byte HTML encodings are not corrupted in search excerpts'); } /** |