function CKEditor5PluginManagerTest::testInvalidPluginDefinitions
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testInvalidPluginDefinitions()
- 10 core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testInvalidPluginDefinitions()
@covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::processDefinition @dataProvider providerTestInvalidPluginDefinitions
File
-
core/
modules/ ckeditor5/ tests/ src/ Kernel/ CKEditor5PluginManagerTest.php, line 197
Class
- CKEditor5PluginManagerTest
- Tests different ways of enabling CKEditor 5 plugins.
Namespace
Drupal\Tests\ckeditor5\KernelCode
public function testInvalidPluginDefinitions(string $yaml, ?string $expected_exception = NULL, ?string $expected_message = NULL, ?array $additional_files = []) : void {
if ($expected_exception) {
$this->expectException($expected_exception);
}
if ($expected_message) {
$this->expectExceptionMessage($expected_message);
}
$container = $this->mockModuleInVfs('ckeditor5_invalid_plugin', $yaml, $additional_files);
$pluginManager = $container->get('plugin.manager.ckeditor5.plugin');
$this->assertNotNull($pluginManager);
$this->assertIsArray($pluginManager->getDefinitions());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.