function AddItemToToolbarConfigActionTest::setUp

Same name in other branches
  1. 10 core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php \Drupal\Tests\ckeditor5\Kernel\ConfigAction\AddItemToToolbarConfigActionTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php, line 46

Class

AddItemToToolbarConfigActionTest
@covers \Drupal\ckeditor5\Plugin\ConfigAction\AddItemToToolbar @group ckeditor5 @group Recipe

Namespace

Drupal\Tests\ckeditor5\Kernel\ConfigAction

Code

protected function setUp() : void {
    parent::setUp();
    $this->installConfig('filter_test');
    $editor = Editor::create([
        'editor' => 'ckeditor5',
        'format' => 'filter_test',
        'image_upload' => [
            'status' => FALSE,
        ],
    ]);
    $editor->save();
    
    /** @var array{toolbar: array{items: array<int, string>}} $settings */
    $settings = Editor::load('filter_test')?->getSettings();
    $this->assertSame([
        'heading',
        'bold',
        'italic',
    ], $settings['toolbar']['items']);
}

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