function CKEditorToolbarButtonTest::setUp

Same name in other branches
  1. 9 core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php \Drupal\Tests\ckeditor\Functional\CKEditorToolbarButtonTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php, line 32

Class

CKEditorToolbarButtonTest
Tests CKEditor toolbar buttons when the language direction is RTL.

Namespace

Drupal\Tests\ckeditor\Functional

Code

protected function setUp() {
    parent::setUp();
    // Create a text format and associate this with CKEditor.
    FilterFormat::create([
        'format' => 'full_html',
        'name' => 'Full HTML',
        'weight' => 1,
        'filters' => [],
    ])->save();
    Editor::create([
        'format' => 'full_html',
        'editor' => 'ckeditor',
    ])->save();
    // Create a new user with admin rights.
    $this->admin_user = $this->drupalCreateUser([
        'administer languages',
        'access administration pages',
        'administer site configuration',
        'administer filters',
    ]);
}

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