In the trait method Drupal\Tests\RandomGeneratorTrait::randomStringValidate() there is a comment with a reference to \Drupal\simpletest\WebTestBase::assertLink(). That method does not exist any more and therefore need to be changed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

mohrerao’s picture

We can replace the whole if statement along with comment here

// Consecutive spaces causes issues for
    // \Drupal\simpletest\WebTestBase::assertLink().
    if (preg_match('/\s{2,}/', $string)) {
      return FALSE;
    }
mohrerao’s picture

Status: Active » Needs review
FileSize
753 bytes

Adding a patch as commented in #2.

longwave’s picture

Are we sure that two spaces is OK elsewhere? e.g. in HTML two or more spaces are collapsed to one. I think this is technically an API change as previously a string with two spaces would not validate and now it will, so maybe we should just fix the comment?

mohrerao’s picture

Agreed! Just updating the comment.

longwave’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 8be5edace1 to 9.1.x and 8fb84dad69 to 9.0.x. Thanks!

backpoorted too 9.0.x cause docs.

  • alexpott committed 8be5eda on 9.1.x
    Issue #3144331 by mohrerao, longwave, daffie: Update comment in Drupal\...

  • alexpott committed 8fb84da on 9.0.x
    Issue #3144331 by mohrerao, longwave, daffie: Update comment in Drupal\...

Status: Fixed » Closed (fixed)

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