function CKEditor5PluginManagerTest::testInvalidPluginDefinitions

Same name in other branches
  1. 10 core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testInvalidPluginDefinitions()
  2. 11.x 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 178

Class

CKEditor5PluginManagerTest
Tests different ways of enabling CKEditor 5 plugins.

Namespace

Drupal\Tests\ckeditor5\Kernel

Code

public function testInvalidPluginDefinitions(string $yaml, ?string $expected_message, array $additional_files = []) : void {
    if ($expected_message) {
        $this->expectException(InvalidPluginDefinitionException::class);
        $this->expectExceptionMessage($expected_message);
    }
    $container = $this->mockModuleInVfs('ckeditor5_invalid_plugin', $yaml, $additional_files);
    $container->get('plugin.manager.ckeditor5.plugin')
        ->getDefinitions();
}

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