function ImageTest::imageAttributes

Same name in other branches
  1. 9 core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTest::imageAttributes()

Provides the relevant image attributes.

Return value

string[]

Overrides ImageTestBase::imageAttributes

File

core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php, line 117

Class

ImageTest
@coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image @group ckeditor5 @group #slow @internal

Namespace

Drupal\Tests\ckeditor5\FunctionalJavascript

Code

protected function imageAttributes() {
    return [
        'data-entity-type' => 'file',
        'data-entity-uuid' => $this->file
            ->uuid(),
        'src' => $this->file
            ->createFileUrl(),
        'width' => '40',
        'height' => '20',
    ];
}

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