function TextProcessedAttachmentsTest::setUp

Same name and namespace in other branches
  1. main core/modules/text/tests/src/Kernel/TextProcessedAttachmentsTest.php \Drupal\Tests\text\Kernel\TextProcessedAttachmentsTest::setUp()

Overrides EntityKernelTestBase::setUp

File

core/modules/text/tests/src/Kernel/TextProcessedAttachmentsTest.php, line 32

Class

TextProcessedAttachmentsTest
Tests that TextProcessed::getAttachments() bubbles filter attachments.

Namespace

Drupal\Tests\text\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  FilterFormat::create([
    'format' => 'test_assets_format',
    'name' => 'Test assets format',
    'filters' => [
      'filter_test_assets' => [
        'status' => TRUE,
      ],
    ],
  ])->save();
  FieldStorageConfig::create([
    'field_name' => 'formatted_text',
    'entity_type' => 'entity_test',
    'type' => 'text',
  ])->save();
  FieldConfig::create([
    'entity_type' => 'entity_test',
    'bundle' => 'entity_test',
    'field_name' => 'formatted_text',
    'label' => 'Formatted text',
  ])->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.