You are here

public function EditorIntegrationTest::testAttachments in Drupal 9

Tests in-place editor attachments when the Editor module is present.

File

core/modules/quickedit/tests/src/Kernel/EditorIntegrationTest.php, line 198

Class

EditorIntegrationTest
Tests Edit module integration (Editor module's inline editing support).

Namespace

Drupal\Tests\quickedit\Kernel

Code

public function testAttachments() {
  $this->editorSelector = $this->container
    ->get('quickedit.editor.selector');
  $editors = [
    'editor',
  ];
  $attachments = $this->editorSelector
    ->getEditorAttachments($editors);
  $this
    ->assertSame([
    'library' => [
      'editor/quickedit.inPlaceEditor.formattedText',
    ],
  ], $attachments, "Expected attachments for Editor module's in-place editor found.");
}