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?

#6 drupal_core-search_test_error-2083773-6.patch919 bytesPete B
PASSED: [[SimpleTest]]: [MySQL] 59,843 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


littledynamo’s picture

Assigned: Unassigned » littledynamo

Got a code sprint planned next week, so we'll take care of this one.

littledynamo’s picture

Issue tags: -Novice
jhodgdon’s picture

Issue tags: +Novice

Let'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.


littledynamo’s picture

Sorry, didn't mean to take the novice tag off. Not sure how I managed that! :)

littledynamo’s picture

Assigned: littledynamo » Unassigned
Pete B’s picture

Status: Active » Needs review
919 bytes
PASSED: [[SimpleTest]]: [MySQL] 59,843 pass(es). View

Patch for this.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

Thank you! This is correct.

alexpott’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed c3ef2d3 and pushed to 8.x. Thanks!

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Status: Patch (to be ported) » Fixed

Actually, the 7.x version of this is being covered in #1970588: SearchExcerptTestCase should be a DrupalWebTestCase

Status: Fixed » Closed (fixed)

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

xjm’s picture

Issue summary: View changes
Issue tags: -needs backport to D7

Removing the backport tag since it was resolved for 7.x in a different issue.