diff --git a/core/tests/Drupal/Tests/RandomGeneratorTrait.php b/core/tests/Drupal/Tests/RandomGeneratorTrait.php
index df320237a2f50c27a43f38130962c3769ec42b0a..0f27c63df741285b75f755fc5a52d01e40f8369f 100644
--- a/core/tests/Drupal/Tests/RandomGeneratorTrait.php
+++ b/core/tests/Drupal/Tests/RandomGeneratorTrait.php
@@ -61,8 +61,7 @@ public function randomString($length = 8) {
    *   TRUE if the random string is valid, FALSE if not.
    */
   public function randomStringValidate($string) {
-    // Consecutive spaces causes issues for
-    // \Drupal\simpletest\WebTestBase::assertLink().
+    // Consecutive spaces causes issues for link validation.
     if (preg_match('/\s{2,}/', $string)) {
       return FALSE;
     }