function CKEditorUpdateOmitDisabledPluginSettings::testUpdateUpdateOmitDisabledSettingsEntitySave

Ensure settings for disabled CKEditor 4 plugins are omitted on entity save.

File

core/modules/ckeditor/tests/src/Functional/Update/CKEditorUpdateOmitDisabledPluginSettings.php, line 47

Class

CKEditorUpdateOmitDisabledPluginSettings
Tests the update path for CKEditor plugin settings for disabled plugins.

Namespace

Drupal\Tests\ckeditor\Functional\Update

Code

public function testUpdateUpdateOmitDisabledSettingsEntitySave() {
  $editor = Editor::load('basic_html');
  $settings = $editor->getSettings();
  $this->assertArrayHasKey('stylescombo', $settings['plugins']);
  $editor->save();
  $editor = Editor::load('basic_html');
  $settings = $editor->getSettings();
  $this->assertArrayNotHasKey('stylescombo', $settings['plugins']);
}

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