class CKEditorUpdateOmitDisabledPluginSettings
Tests the update path for CKEditor plugin settings for disabled plugins.
@group Update
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\ckeditor\Functional\Update\CKEditorUpdateOmitDisabledPluginSettings extends \Drupal\FunctionalTests\Update\UpdatePathTestBase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of CKEditorUpdateOmitDisabledPluginSettings
File
-
core/
modules/ ckeditor/ tests/ src/ Functional/ Update/ CKEditorUpdateOmitDisabledPluginSettings.php, line 13
Namespace
Drupal\Tests\ckeditor\Functional\UpdateView source
class CKEditorUpdateOmitDisabledPluginSettings extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-9.3.0.filled.standard.php.gz',
];
}
/**
* Ensure settings for disabled CKEditor 4 plugins are omitted on post update.
*/
public function testUpdateUpdateOmitDisabledSettingsPostUpdate() {
$editor = Editor::load('basic_html');
$settings = $editor->getSettings();
$this->assertArrayHasKey('stylescombo', $settings['plugins']);
$this->runUpdates();
$editor = Editor::load('basic_html');
$settings = $editor->getSettings();
$this->assertArrayNotHasKey('stylescombo', $settings['plugins']);
}
/**
* Ensure settings for disabled CKEditor 4 plugins are omitted on entity save.
*/
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.