function CKEditorStylesComboAdminTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/ckeditor/tests/src/Functional/CKEditorStylesComboAdminTest.php, line 45

Class

CKEditorStylesComboAdminTest
Tests administration of the CKEditor StylesCombo plugin.

Namespace

Drupal\Tests\ckeditor\Functional

Code

protected function setUp() {
    parent::setUp();
    $this->format = strtolower($this->randomMachineName());
    $filter_format = FilterFormat::create([
        'format' => $this->format,
        'name' => $this->randomString(),
        'filters' => [],
    ]);
    $filter_format->save();
    $editor = Editor::create([
        'format' => $this->format,
        'editor' => 'ckeditor',
    ]);
    $editor->save();
    $this->adminUser = $this->drupalCreateUser([
        'administer filters',
    ]);
}

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