.../ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php index 4f59069..7a6f3cc 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php @@ -127,6 +127,9 @@ function testGetJSSettings() { $format = entity_load('filter_format', 'filtered_html'); $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'; @@ -135,6 +138,9 @@ 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.'); @@ -168,6 +174,9 @@ 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,