diff -u b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php --- b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php +++ b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php @@ -66,7 +66,7 @@ $dependencies['config'] = array_merge($config, $format_dependencies); return $dependencies; } - + /** * {@inheritdoc} */ diff -u b/core/modules/text/tests/src/Functional/TextFieldTest.php b/core/modules/text/tests/src/Functional/TextFieldTest.php --- b/core/modules/text/tests/src/Functional/TextFieldTest.php +++ b/core/modules/text/tests/src/Functional/TextFieldTest.php @@ -163,7 +163,8 @@ 'format' => mb_strtolower($this->randomMachineName()), 'name' => $this->randomMachineName(), ]; - $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration')); + $this->drupalGet('admin/config/content/formats/add'); + $this->submitForm($edit, 'Save configuration'); filter_formats_reset(); /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */ $entity_type_manager = $this->container->get('entity_type.manager'); @@ -177,7 +178,8 @@ 'format' => mb_strtolower($this->randomMachineName()), 'name' => $this->randomMachineName(), ]; - $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration')); + $this->drupalGet('admin/config/content/formats/add'); + $this->submitForm($edit, 'Save configuration'); filter_formats_reset(); /** @var \Drupal\filter\Entity\FilterFormat $format2 */ $format2 = $filter_format_storage->load($edit['format']); @@ -230,7 +232,7 @@ // We shouldn't have the 'format' selector since only one format is allowed. $this->drupalGet('entity_test/add'); $this->assertSession()->fieldExists("{$field_name}[0][value]", NULL); - $this->assertNoFieldByName("{$field_name}[0][format]", NULL, 'Format selector is not displayed'); + $this->assertSession()->fieldNotExists("{$field_name}[0][format]"); // Change field to allow all formats by configuring none as allowed. $field->setSetting('allowed_formats', []);