function EditorIntegrationTest::testAttachments

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

File

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

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' => [
            'quickedit/quickedit.inPlaceEditor.formattedText',
        ],
    ], $attachments, "Expected attachments for Editor module's in-place editor found.");
}

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