You are here

protected function EditorManagerTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/editor/tests/src/Kernel/EditorManagerTest.php \Drupal\Tests\editor\Kernel\EditorManagerTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/editor/tests/src/Kernel/EditorManagerTest.php, line 30

Class

EditorManagerTest
Tests detection of text editors and correct generation of attachments.

Namespace

Drupal\Tests\editor\Kernel

Code

protected function setUp() : void {
  parent::setUp();

  // Install the Filter module.
  // Add text formats.
  $filtered_html_format = FilterFormat::create([
    'format' => 'filtered_html',
    'name' => 'Filtered HTML',
    'weight' => 0,
    'filters' => [],
  ]);
  $filtered_html_format
    ->save();
  $full_html_format = FilterFormat::create([
    'format' => 'full_html',
    'name' => 'Full HTML',
    'weight' => 1,
    'filters' => [],
  ]);
  $full_html_format
    ->save();
}