diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php index 5d80b3c28ef227e3bdbc8a77fa6b8e0a0734f56c..faea205ff07970958567f929a8b07e0b798996be 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 707b4b65b7bae3a3067689f692ec103dce870dfd..271bb31b08161d3ccffeded377adceea6006b24f 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 a1ae5b761076f62603a50baa0bb3f40a888d3554..7cc42e14c3db96d6aee793cc9ff5f6fa4051ae9d 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/Entity/EntityQueryAccessTest.php b/core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php index 1a5b85353ae19cddf04a78ab8e4593b711b4032e..eba3696288f738d791c218cafcf61888dec4a210 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(); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php index 7b5b1a8fd7b9cf5801d7f1595681f86376ea08cb..8af887d1ef1ba65f34b684e4aaa4b9bb12f858a3 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.