You are here

protected function CKEditorPluginManagerTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php \Drupal\Tests\ckeditor\Kernel\CKEditorPluginManagerTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php, line 30

Class

CKEditorPluginManagerTest
Tests different ways of enabling CKEditor plugins.

Namespace

Drupal\Tests\ckeditor\Kernel

Code

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

  // Install the Filter module.
  // Create text format, associate CKEditor.
  $filtered_html_format = FilterFormat::create([
    'format' => 'filtered_html',
    'name' => 'Filtered HTML',
    'weight' => 0,
    'filters' => [],
  ]);
  $filtered_html_format
    ->save();
  $editor = Editor::create([
    'format' => 'filtered_html',
    'editor' => 'ckeditor',
  ]);
  $editor
    ->save();
}