function CKEditor5PluginManagerTest::testPluginSupportingElement
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testPluginSupportingElement()
- 11.x core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testPluginSupportingElement()
Tests the logic of findPluginSupportingElement.
When multiple plugins support a given tag, this method decides which plugin to return based on which provides the broadest attribute support.
@covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::findPluginSupportingElement
@dataProvider providerTestPluginSupportingElement
File
-
core/
modules/ ckeditor5/ tests/ src/ Kernel/ CKEditor5PluginManagerTest.php, line 1536
Class
- CKEditor5PluginManagerTest
- Tests different ways of enabling CKEditor 5 plugins.
Namespace
Drupal\Tests\ckeditor5\KernelCode
public function testPluginSupportingElement(string $tag, ?string $expected_plugin_id) : void {
$this->enableModules([
'ckeditor5_definition_supporting_element',
]);
$plugin_id = $this->manager
->findPluginSupportingElement($tag);
$this->assertSame($expected_plugin_id, $plugin_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.