Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Over on #1970588: SearchExcerptTestCase should be a DrupalWebTestCase Heine apparently found and patched an unrelated bug in the SearchExcerpt test D7 version:
$longtext = str_repeat($text . ' ', 10);
- $result = preg_replace('| +|', ' ', search_excerpt('nothing', $text));
+ $result = preg_replace('| +|', ' ', search_excerpt('nothing', $longtext));
$this->assertTrue(strpos($result, $expected) === 0, 'When keyword is not found in long string, return value starts as expected');
This fix needs to get into Drupal 8 and then be backported to D7. I'm moving it to a new issue. Can someone make a quick patch please?
Comment | File | Size | Author |
---|---|---|---|
#6 | drupal_core-search_test_error-2083773-6.patch | 919 bytes | Pete B |
Comments
Comment #1
littledynamo CreditAttribution: littledynamo commentedGot a code sprint planned next week, so we'll take care of this one.
Comment #2
littledynamo CreditAttribution: littledynamo commentedComment #3
jhodgdonLet's leave the Novice tag on. Many times it happens that someone assigns an issue to themselves and never actually follows through to finish it, and at least this way if you do (not that I think you will, but just in case), the issue will probably be picked up later by a different contributor. You have already claimed the issue and commented that you plan to make a patch next week, so no one else should step in and do it before then.
Thanks!
Comment #4
littledynamo CreditAttribution: littledynamo commentedSorry, didn't mean to take the novice tag off. Not sure how I managed that! :)
Comment #5
littledynamo CreditAttribution: littledynamo commentedComment #6
Pete B CreditAttribution: Pete B commentedPatch for this.
Comment #7
jhodgdonThank you! This is correct.
Comment #8
alexpottCommitted c3ef2d3 and pushed to 8.x. Thanks!
Comment #9
jhodgdonActually, the 7.x version of this is being covered in #1970588: SearchExcerptTestCase should be a DrupalWebTestCase
Comment #11
xjmRemoving the backport tag since it was resolved for 7.x in a different issue.