function CKEditorToolbarButtonTest::setUp

Same name and namespace in other branches
  1. 8.9.x 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 40

Class

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

Namespace

Drupal\Tests\ckeditor\Functional

Code

protected function setUp() : void {
  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->adminUser = $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.