diff -u b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php --- b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php +++ b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php @@ -8,7 +8,6 @@ namespace Drupal\editor\Entity; use Drupal\Core\Config\Entity\ConfigEntityBase; -use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\editor\EditorInterface; /** only in patch2: unchanged: --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php @@ -124,12 +124,10 @@ function testGetJSSettings() { // Change the allowed HTML tags; the "allowedContent" and "format_tags" // settings for CKEditor should automatically be updated as well. - $format = entity_load('filter_format', 'filtered_html'); + $format = $editor->getFilterFormat(); $format->filters('filter_html')->settings['allowed_html'] .= '
'; $format->save(); - // $editor is a Text Editor object that has a statically cached FilterFormat - // which is now outdated. Therefore, reload it. - $editor = entity_load('editor', $editor->id()); + $expected_config['allowedContent']['pre'] = array('attributes' => TRUE, 'styles' => FALSE, 'classes' => TRUE); $expected_config['allowedContent']['h3'] = array('attributes' => TRUE, 'styles' => FALSE, 'classes' => TRUE); $expected_config['format_tags'] = 'p;h3;h4;h5;h6;pre'; @@ -138,9 +136,7 @@ function testGetJSSettings() { // Disable the filter_html filter: allow *all *tags. $format->setFilterConfig('filter_html', array('status' => 0)); $format->save(); - // $editor is a Text Editor object that has a statically cached FilterFormat - // which is now outdated. Therefore, reload it. - $editor = entity_load('editor', $editor->id()); + $expected_config['allowedContent'] = TRUE; $expected_config['format_tags'] = 'p;h1;h2;h3;h4;h5;h6;pre'; $this->assertIdentical($expected_config, $this->ckeditor->getJSSettings($editor), 'Generated JS settings are correct for customized configuration.'); @@ -174,9 +170,7 @@ function testGetJSSettings() { ), )); $format->save(); - // $editor is a Text Editor object that has a statically cached FilterFormat - // which is now outdated. Therefore, reload it. - $editor = entity_load('editor', $editor->id()); + $expected_config['allowedContent'] = array( 'p' => array( 'attributes' => TRUE,