diff -u b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php --- b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php +++ b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php @@ -248,7 +248,7 @@ /** * {@inheritdoc} */ - public function getJSConfiguration(EditorEntity $editor) { + public function getJsConfiguration(EditorEntity $editor) { $settings = array(); // Get the settings for all enabled plugins, even the internal ones. @@ -369,7 +369,7 @@ /** * Builds the "toolbar" configuration part of the CKEditor JS settings. * - * @see getJSConfiguration() + * @see getJsConfiguration() * * @param \Drupal\editor\Entity\Editor $editor * A configured text editor object. @@ -392,7 +392,7 @@ /** * Builds the "contentsCss" configuration part of the CKEditor JS settings. * - * @see getJSConfiguration() + * @see getJsConfiguration() * * @param \Drupal\editor\Entity\Editor $editor * A configured text editor object. diff -u b/core/modules/ckeditor/src/Tests/CKEditorTest.php b/core/modules/ckeditor/src/Tests/CKEditorTest.php --- b/core/modules/ckeditor/src/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorTest.php @@ -71,7 +71,7 @@ } /** - * Tests CKEditor::getJSConfiguration(). + * Tests CKEditor::getJsConfiguration(). */ function testGetJSSettings() { $editor = entity_load('editor', 'filtered_html'); @@ -95,7 +95,7 @@ ), ); ksort($expected_config); - $this->assertIdentical($expected_config, $this->ckeditor->getJSConfiguration($editor), 'Generated JS settings are correct for default configuration.'); + $this->assertIdentical($expected_config, $this->ckeditor->getJsConfiguration($editor), 'Generated JS settings are correct for default configuration.'); // Customize the configuration: add button, have two contextually enabled // buttons, and configure a CKEditor plugin setting. @@ -119,7 +119,7 @@ $expected_config['drupalExternalPlugins']['llama_contextual_and_button'] = file_create_url('core/modules/ckeditor/tests/modules/js/llama_contextual_and_button.js'); $expected_config['contentsCss'][] = file_create_url('core/modules/ckeditor/tests/modules/ckeditor_test.css'); ksort($expected_config); - $this->assertIdentical($expected_config, $this->ckeditor->getJSConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); + $this->assertIdentical($expected_config, $this->ckeditor->getJsConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); // Change the allowed HTML tags; the "allowedContent" and "format_tags" // settings for CKEditor should automatically be updated as well. @@ -130,7 +130,7 @@ $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'; - $this->assertIdentical($expected_config, $this->ckeditor->getJSConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); + $this->assertIdentical($expected_config, $this->ckeditor->getJsConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); // Disable the filter_html filter: allow *all *tags. $format->setFilterConfig('filter_html', array('status' => 0)); @@ -139,7 +139,7 @@ $expected_config['allowedContent'] = TRUE; $expected_config['disallowedContent'] = FALSE; $expected_config['format_tags'] = 'p;h1;h2;h3;h4;h5;h6;pre'; - $this->assertIdentical($expected_config, $this->ckeditor->getJSConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); + $this->assertIdentical($expected_config, $this->ckeditor->getJsConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); // Enable the filter_test_restrict_tags_and_attributes filter. $format->setFilterConfig('filter_test_restrict_tags_and_attributes', array( @@ -208,12 +208,12 @@ ); $expected_config['format_tags'] = 'p'; ksort($expected_config); - $this->assertIdentical($expected_config, $this->ckeditor->getJSConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); + $this->assertIdentical($expected_config, $this->ckeditor->getJsConfiguration($editor), 'Generated JS settings are correct for customized configuration.'); // Assert that we're robust enough to withstand people messing with State // manually. \Drupal::state()->delete('ckeditor_internal_format_tags:' . $format->id()); - $this->assertIdentical($expected_config, $this->ckeditor->getJSConfiguration($editor), 'Even when somebody manually deleted the key-value pair in State with the pre-calculated format_tags setting, it returns "p" — because the

tag is always allowed.'); + $this->assertIdentical($expected_config, $this->ckeditor->getJsConfiguration($editor), 'Even when somebody manually deleted the key-value pair in State with the pre-calculated format_tags setting, it returns "p" — because the

tag is always allowed.'); } /** @@ -386,7 +386,7 @@ $this->installSchema('locale', 'locales_location'); $this->installSchema('locale', 'locales_target'); $editor = Editor::load('filtered_html'); - $this->ckeditor->getJSConfiguration($editor); + $this->ckeditor->getJsConfiguration($editor); $localeStorage = $this->container->get('locale.storage'); $string = $localeStorage->findString(array('source' => 'Edit Link', 'context' => '')); $this->assertTrue(!empty($string), 'String from JavaScript file saved.'); @@ -414,7 +414,7 @@ // Test that we now get the expected language. $editor = Editor::load('filtered_html'); - $settings = $this->ckeditor->getJSConfiguration($editor); + $settings = $this->ckeditor->getJsConfiguration($editor); $this->assertEqual($settings['language'], $langcode); }