insert-8.x-2.x-dev/tests/src/FunctionalJavaScript/InsertImageCKEditorTestBase.php

tests/src/FunctionalJavaScript/InsertImageCKEditorTestBase.php
<?php

namespace Drupal\Tests\insert\FunctionalJavascript;

use Drupal\editor\Entity\Editor;
use Drupal\filter\Entity\FilterFormat;

/**
 *
 */
abstract class InsertImageCKEditorTestBase extends InsertImageTestBase {

  /**
   * @inheritdoc
   */
  protected static $modules = [
    'node', 'file', 'image', 'insert', 'editor', 'field_ui', 'ckeditor',
  ];

  /**
   * @inheritdoc
   */
  protected function setUp(): void {
    parent::setUp();

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

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc