function EditorManagerTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/editor/tests/src/Kernel/EditorManagerTest.php \Drupal\Tests\editor\Kernel\EditorManagerTest::setUp()
  2. 8.9.x core/modules/editor/tests/src/Kernel/EditorManagerTest.php \Drupal\Tests\editor\Kernel\EditorManagerTest::setUp()
  3. 11.x 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 33

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();
}

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