diff --git a/core/modules/link/src/Tests/LinkFieldUITest.php b/core/modules/link/src/Tests/LinkFieldUITest.php
index ac349a0..109475b 100644
--- a/core/modules/link/src/Tests/LinkFieldUITest.php
+++ b/core/modules/link/src/Tests/LinkFieldUITest.php
@@ -57,8 +57,8 @@ function testFieldUI() {
// Add a link field to the newly-created type. It defaults to allowing both
// internal and external links.
- $label = $this->randomMachineName();
- $description = $this->randomMachineName();
+ $label = 'link_field_label';
+ $description = 'link field description';
$field_name = Unicode::strtolower($label);
$field_edit = [
'description' => $description,
@@ -85,6 +85,7 @@ function testFieldUI() {
LinkItemInterface::LINK_GENERIC,
LinkItemInterface::LINK_INTERNAL,
];
+ $field_count = 0;
// Test all variations of link types on all cardinalities.
foreach ($cardinalities as $cardinality) {
foreach ($link_types as $link_type) {
@@ -92,6 +93,7 @@ function testFieldUI() {
foreach ($title_settings as $title_setting) {
// Both test empty descriptions and not empty descriptions.
foreach ([TRUE, FALSE] as $description_enabled) {
+ $field_count++;
// Output variation being tested for debugging purpose.
$this->verbose("Now testing - cardinality: $cardinality - link_type:
$link_type, title_setting: $title_setting, description_enabled:
@@ -107,8 +109,8 @@ function testFieldUI() {
// Create a field for this content type with the current cardinality
// and link field settings.
- $label = $this->randomMachineName();
- $description = $this->randomMachineName();
+ $label = "link_field_label_$field_count";
+ $description = 'link field description with html ' . $field_count;
$field_name = Unicode::strtolower($label);
$storage_edit = ['cardinality_number' => $cardinality];
$field_edit = [
@@ -126,8 +128,8 @@ function testFieldUI() {
// Check that the help texts we assume should be there, is there.
switch ($link_type) {
case LinkItemInterface::LINK_GENERIC:
- // Check that the text for allowing both internal and external is
- // present.
+ // Check that the text for allowing both internal and external
+ // is present.
$this->assertRaw('You can also enter an internal path such as /node/add or an external URL such as http://example.com.');
break;
@@ -137,8 +139,8 @@ function testFieldUI() {
break;
case LinkItemInterface::LINK_INTERNAL:
- // Internal links have no "system" description. Test that none of
- // the above shows here.
+ // Internal links have no "system" description. Test that none
+ // of the above shows here.
$this->assertNoRaw('This must be an external URL such as http://example.com.');
$this->assertNoRaw('You can also enter an internal path such as /node/add or an external URL such as http://example.com.');
// And assert that the field prefix is the internal URL.