diff --git a/core/modules/link/src/Tests/LinkFieldUiHelptextTest.php b/core/modules/link/src/Tests/LinkFieldUiHelptextTest.php new file mode 100644 index 0000000..730b32f --- /dev/null +++ b/core/modules/link/src/Tests/LinkFieldUiHelptextTest.php @@ -0,0 +1,58 @@ +drupalLogin($this->drupalCreateUser(['administer content types', 'administer node fields', 'administer node display'])); + } + + /** + * Tests external only help text displays. + */ + function testFieldUiHelptext() { + // Add a content type. + $type = $this->drupalCreateContentType(); + $type_path = 'admin/structure/types/manage/' . $type->id(); + $add_path = 'node/add/' . $type->id(); + + // Add a link field to the newly-created type. + $label = $this->randomMachineName(); + $field_name = Unicode::strtolower($label); + $this->fieldUIAddNewField($type_path, $field_name, $label, 'link'); + + $this->drupalLogin($this->drupalCreateUser(['create ' . $type->id() . ' content'])); + $this->drupalGet($add_path); + $this->assertRaw('You can also enter an internal path such as /node/add or an external URL such as http://example.com.'); + } + +}