function CKEditor5PluginManagerTest::testDerivedPluginDefinitions

Same name and namespace in other branches
  1. 9 core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testDerivedPluginDefinitions()
  2. 11.x core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testDerivedPluginDefinitions()

@covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getDiscovery
@dataProvider providerTestDerivedPluginDefinitions

File

core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php, line 1614

Class

CKEditor5PluginManagerTest
Tests different ways of enabling CKEditor 5 plugins.

Namespace

Drupal\Tests\ckeditor5\Kernel

Code

public function testDerivedPluginDefinitions(string $yaml, ?string $expected_exception = NULL, ?string $expected_message = NULL, array $additional_files = [], ?array $expected_derived_plugin_definitions = NULL) : void {
  if ($expected_exception) {
    $this->expectException($expected_exception);
  }
  if ($expected_message) {
    $this->expectExceptionMessage($expected_message);
  }
  $container = $this->mockModuleInVfs('ckeditor5_derived_plugin', $yaml, $additional_files);
  $actual_definitions = $container->get('plugin.manager.ckeditor5.plugin')
    ->getDefinitions();
  $this->assertEquals($expected_derived_plugin_definitions, $actual_definitions);
}

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