You are here

protected function InsertImageCKEditorTestBase::setUp in Insert 8.2

@inheritdoc

Overrides InsertFileTestBase::setUp

File

tests/src/FunctionalJavaScript/InsertImageCKEditorTestBase.php, line 23

Class

InsertImageCKEditorTestBase

Namespace

Drupal\Tests\insert\FunctionalJavascript

Code

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

  // Create text format and associate CKEditor.
  $filtered_html_format = FilterFormat::create([
    'format' => 'full_html',
    'name' => 'Full HTML',
    'weight' => 0,
    'filters' => [
      'filter_align' => [
        'status' => 1,
      ],
      'filter_caption' => [
        'status' => 1,
      ],
      'editor_file_reference' => [
        'status' => 1,
      ],
    ],
  ]);
  $filtered_html_format
    ->save();
  $editor = Editor::create([
    'format' => 'full_html',
    'editor' => 'ckeditor',
  ]);
  $editor
    ->save();
}