diff --git a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php index b9c7a4e..a3e7b8c 100644 --- a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php @@ -169,7 +169,9 @@ public function testRandomStringValidator() { * TRUE if the random string is valid, FALSE if not. */ public function _RandomStringValidate($string) { - if (empty($this->firstStringGenerated)) { + // Return FALSE for the first generated string and any string that is the + // same, as the test expects a different string to be returned. + if (empty($this->firstStringGenerated) || $string == $this->firstStringGenerated) { $this->firstStringGenerated = $string; return FALSE; }