$this->
assertSame($default_plugins,
$definitions, 'No CKEditor 5 plugins found besides the built-in ones.'
);
$default_libraries =
[ 'ckeditor5/internal.drupal.ckeditor5',
'ckeditor5/internal.drupal.ckeditor5.emphasis',
'ckeditor5/internal.drupal.ckeditor5.htmlEngine',
'core/ckeditor5.autoformat',
'core/ckeditor5.basic',
'core/ckeditor5.essentials',
'core/ckeditor5.htmlSupport',
'core/ckeditor5.pasteFromOffice',
];
$this->
assertSame($default_libraries,
$this->manager->
getEnabledLibraries($editor));
// Enable the CKEditor 5 Test module, which has the layercake plugin and
// clear the editor manager's static cache so that it is picked up.
$this->
enableModules(['ckeditor5_test'
]);
$this->manager =
$this->container->
get('plugin.manager.ckeditor5.plugin'
);
$this->manager->
clearCachedDefinitions();
// Case 2: The CKEditor 5 layercake plugin is available and library should
// NOT be loaded if its toolbar items are not enabled.
$this->
assertSame($default_plugins,
array_keys($this->manager->
getEnabledDefinitions($editor)));
$this->
assertSame($default_libraries,
$this->manager->
getEnabledLibraries($editor));