diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index 1b746e6..f01019f 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -1185,13 +1185,14 @@ protected function settingsSet($name, $value) { * @see Drupal\simpletest\TestBase::randomName() */ public function randomString($length = 8) { - do { - $str = ''; - for ($i = 0; $i < $length; $i++) { - $str .= chr(mt_rand(32, 126)); - } - } while (isset($this->randomStrings[$str])); - return $str; +// do { +// $str = ''; +// for ($i = 0; $i < $length; $i++) { +// $str .= chr(mt_rand(32, 126)); +// } +// } while (isset($this->randomStrings[$str])); +// return $str; + return str_repeat('a', $length); } /** @@ -1215,15 +1216,16 @@ public function randomString($length = 8) { * @see Drupal\simpletest\TestBase::randomString() */ public function randomName($length = 8) { - do { - $values = array_merge(range(65, 90), range(97, 122), range(48, 57)); - $max = count($values) - 1; - $str = chr(mt_rand(97, 122)); - for ($i = 1; $i < $length; $i++) { - $str .= chr($values[mt_rand(0, $max)]); - } - } while (isset($this->randomNames[$str])); - return $str; +// do { +// $values = array_merge(range(65, 90), range(97, 122), range(48, 57)); +// $max = count($values) - 1; +// $str = chr(mt_rand(97, 122)); +// for ($i = 1; $i < $length; $i++) { +// $str .= chr($values[mt_rand(0, $max)]); +// } +// } while (isset($this->randomNames[$str])); +// return $str; + return str_repeat('a', $length); } /**