diff --git a/core/modules/text/src/Tests/TextFieldTest.php b/core/modules/text/src/Tests/TextFieldTest.php index 37c7a068b9..6b1576df24 100644 --- a/core/modules/text/src/Tests/TextFieldTest.php +++ b/core/modules/text/src/Tests/TextFieldTest.php @@ -2,6 +2,7 @@ namespace Drupal\text\Tests; +use Drupal\Component\Utility\Unicode; use Drupal\entity_test\Entity\EntityTest; use Drupal\field\Entity\FieldConfig; use Drupal\field\Tests\String\StringFieldTest; @@ -143,8 +144,7 @@ public function testTextfieldWidgetsFormatted() { /** * Test widgets for fields with selected allowed formats. */ - function testTextfieldWidgetsAllowedFormats() { - + public function testTextfieldWidgetsAllowedFormats() { // Create one text format. $this->drupalLogin($this->adminUser); $edit = [ @@ -153,7 +153,9 @@ function testTextfieldWidgetsAllowedFormats() { ]; $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration')); filter_formats_reset(); - $format1 = entity_load('filter_format', $edit['format']); + $filter_format_storage = \Drupal::entityTypeManager()->getStorage('filter_format'); + /** @var \Drupal\filter\Entity\FilterFormat $format1 */ + $format1 = $filter_format_storage->load($edit['format']); // Create a second text format. $edit = [ @@ -162,7 +164,8 @@ function testTextfieldWidgetsAllowedFormats() { ]; $this->drupalPostForm('admin/config/content/formats/add', $edit, t('Save configuration')); filter_formats_reset(); - $format2 = entity_load('filter_format', $edit['format']); + /** @var \Drupal\filter\Entity\FilterFormat $format2 */ + $format2 = $filter_format_storage->load($edit['format']); // Grant access to both formats to the user. $roles = $this->webUser->getRoles(); diff --git a/core/profiles/demo_umami/config/install/field.field.block_content.disclaimer_block.field_copyright.yml b/core/profiles/demo_umami/config/install/field.field.block_content.disclaimer_block.field_copyright.yml index 964a88887c..30cbbdbb05 100644 --- a/core/profiles/demo_umami/config/install/field.field.block_content.disclaimer_block.field_copyright.yml +++ b/core/profiles/demo_umami/config/install/field.field.block_content.disclaimer_block.field_copyright.yml @@ -16,5 +16,6 @@ required: false translatable: true default_value: { } default_value_callback: '' -settings: { } +settings: + allowed_formats: { } field_type: text_long