$this->
assertSame([],
$this->editorManager->
getAttachments([]), 'No attachments when one text editor is enabled and retrieving attachments for zero text formats.'
);
$expected =
[ 'library' =>
[ 0 => 'editor_test/unicorn',
],
'drupalSettings' =>
[ 'editor' =>
[ 'formats' =>
[ 'full_html' =>
[ 'format' => 'full_html',
'editor' => 'unicorn',
'editorSettings' =>
$unicorn_plugin->
getJSSettings($editor),
'editorSupportsContentFiltering' => TRUE,
'isXssSafe' => FALSE,
],
],
],
],
];
$this->
assertSame($expected,
$this->editorManager->
getAttachments(['filtered_html', 'full_html'
]), 'Correct attachments when one text editor is enabled and retrieving attachments for multiple text formats.'
);
// Case 4: a text editor available associated, but now with its JS settings
// being altered via hook_editor_js_settings_alter().