Security update for Core, with self-updated composer
[yaffs-website] / web / core / tests / Drupal / Tests / Component / PhpStorage / MTimeProtectedFileStorageBase.php
index c36453c3280a991e0d79ae01e68a91855b6cd6fa..e787510088246b7d11a8ce8722e3700506192ed2 100644 (file)
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\Component\PhpStorage;
 
 use Drupal\Component\Utility\Crypt;
+use Drupal\Component\Utility\Random;
 
 /**
  * Base test class for MTime protected storage.
@@ -36,7 +37,10 @@ abstract class MTimeProtectedFileStorageBase extends PhpStorageTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $this->secret = $this->randomMachineName();
+    // Random generator.
+    $random = new Random();
+
+    $this->secret = $random->name(8, TRUE);
 
     $this->settings = [
       'directory' => $this->directory,