diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
index a4cfe98..88d89cc 100644
--- a/core/modules/simpletest/src/TestBase.php
+++ b/core/modules/simpletest/src/TestBase.php
@@ -1298,7 +1298,7 @@ protected function settingsSet($name, $value) {
    * @see \Drupal\Component\Utility\Random::string()
    */
   public function randomString($length = 8) {
-    return $this->getRandomGenerator()->string($length, TRUE, array($this, 'randomStringValidate'));
+    return '&' . $this->getRandomGenerator()->string($length, TRUE, array($this, 'randomStringValidate'));
   }
 
   /**
