function CKEditor4to5UpgradeCompletenessTest::testLyingUpgradePluginForCKEditor5ConfigurableSubsetPlugin

Tests detecting lying cke5_plugin_elements_subset_configuration annotation.

File

core/modules/ckeditor5/tests/src/Kernel/CKEditor4to5UpgradeCompletenessTest.php, line 265

Class

CKEditor4to5UpgradeCompletenessTest
@covers \Drupal\ckeditor5\Plugin\CKEditor4To5Upgrade\Core @group ckeditor5 @internal

Namespace

Drupal\Tests\ckeditor5\Kernel

Code

public function testLyingUpgradePluginForCKEditor5ConfigurableSubsetPlugin() : void {
    $this->enableModules([
        'ckeditor4to5upgrade_plugin_test',
    ]);
    \Drupal::state()->set('ckeditor4to5upgrade_plugin_test', 'lying_subset');
    $this->expectException(\LogicException::class);
    $this->expectExceptionMessage('The "foo" CKEditor4To5Upgrade plugin claims to provide an upgrade path for the "foo" CKEditor 4 plugin settings but does not.');
    $this->upgradePluginManager
        ->computeCKEditor5PluginSubsetConfiguration('foo', FilterFormat::create());
}

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