From 8c7f1c3ff170d962f89ef0dd9150992489247413 Mon Sep 17 00:00:00 2001
From: Michael Strelan <mstrelan@gmail.com>
Date: Thu, 27 Mar 2025 15:23:45 +1000
Subject: [PATCH 1/2] Reroll
 https://www.drupal.org/files/issues/2019-05-21/3041318-18.patch

---
 .../field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php | 2 +-
 .../node/tests/src/Functional/NodeAccessMenuLinkTest.php        | 2 +-
 .../system/tests/src/Functional/System/TrustedHostsTest.php     | 2 +-
 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php
index 5d80b3c28ef2..faea205ff079 100644
--- a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php
+++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php
@@ -292,7 +292,7 @@ protected function addPersistentFieldStorage(): void {
     $this->assertSession()->pageTextContains('Re-use an existing field');
 
     // Ensure that we test with a label that contains HTML.
-    $label = $this->randomString(4) . '<br/>' . $this->randomString(4);
+    $label = $this->randomMachineName(4) . '<br/>' . $this->randomMachineName(4);
     // Add a new field for the orphaned storage.
     $this->fieldUIAddExistingField("admin/structure/types/manage/page", $this->fieldName, $label);
   }
diff --git a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
index 707b4b65b7ba..271bb31b0816 100644
--- a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
+++ b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php
@@ -53,7 +53,7 @@ protected function setUp(): void {
    */
   public function testNodeAccessMenuLink(): void {
 
-    $menu_link_title = $this->randomString();
+    $menu_link_title = 'Test menu link title';
 
     $this->drupalLogin($this->contentAdminUser);
     $edit = [
diff --git a/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php b/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php
index a1ae5b761076..7cc42e14c3db 100644
--- a/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php
+++ b/core/modules/system/tests/src/Functional/System/TrustedHostsTest.php
@@ -94,7 +94,7 @@ public function testShortcut(): void {
     $shortcut_storage = $entity_type_manager->getStorage('shortcut');
 
     $shortcut = $shortcut_storage->create([
-      'title' => $this->randomString(),
+      'title' => 'Test Shortcut Label',
       'link' => 'internal:/admin/reports/status',
       'shortcut_set' => 'default',
     ]);
diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
index 7b5b1a8fd7b9..8af887d1ef1b 100644
--- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php
@@ -147,7 +147,7 @@ public function testDisplayPlugin(): void {
 
     $this->clickLink('Test option title');
 
-    $test_option = $this->randomString();
+    $test_option = $this->randomMachineName();
     $this->submitForm(['test_option' => $test_option], 'Apply');
 
     // Check the new value has been saved by checking the UI summary text.
-- 
GitLab


From 5bea0b802f16f2f8661c97014b7472293feb62e9 Mon Sep 17 00:00:00 2001
From: Michael Strelan <mstrelan@gmail.com>
Date: Thu, 27 Mar 2025 15:26:19 +1000
Subject: [PATCH 2/2] EntityQueryAccessTest

---
 .../tests/src/Functional/Entity/EntityQueryAccessTest.php     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
index 1a5b85353ae1..eba3696288f7 100644
--- a/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php
@@ -49,14 +49,14 @@ public function testMediaEntityQueryAccess(): void {
       // view.
       // @see views_test_access_query_media_access_alter()
       'uuid' => 'hidden-media',
-      'name' => $this->randomString(),
+      'name' => 'Test hidden media title',
       $source_field => $this->randomString(),
     ]);
     $hidden_media->save();
 
     $accessible_media = Media::create([
       'bundle' => $media_type->id(),
-      'name' => $this->randomString(),
+      'name' => 'Test accessible media title',
       $source_field => $this->randomString(),
     ]);
     $accessible_media->save();
-- 
GitLab