You are here

protected function ConfigurationUiTest::setUp in Entity Embed 8

Overrides BrowserTestBase::setUp

File

tests/src/FunctionalJavascript/ConfigurationUiTest.php, line 35

Class

ConfigurationUiTest
Tests text format & text editor configuration UI validation.

Namespace

Drupal\Tests\entity_embed\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();
  $format = FilterFormat::create([
    'format' => 'embed_test',
    'name' => 'Embed format',
    'filters' => [],
  ]);
  $format
    ->save();
  Editor::create([
    'format' => $format
      ->id(),
    'editor' => 'ckeditor',
    'settings' => [
      'toolbar' => [
        'rows' => [
          [
            [
              'name' => 'Tools',
              'items' => [
                'Source',
                'Undo',
                'Redo',
              ],
            ],
          ],
        ],
      ],
    ],
  ])
    ->save();
  $this->adminUser = $this
    ->drupalCreateUser([
    'administer filters',
    $format
      ->getPermissionName(),
  ]);
  $this
    ->drupalLogin($this->adminUser);
}