Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -493,7 +493,7 @@
|
|||
* A HTML string for the button to create a name for a new button group.
|
||||
*/
|
||||
Drupal.theme.ckeditorNewButtonGroup = function () {
|
||||
return '<li class="ckeditor-add-new-group"><button role="button" aria-label="' + Drupal.t('Add a CKEditor button group to the end of this row.') + '">' + Drupal.t('Add group') + '</button></li>';
|
||||
return '<li class="ckeditor-add-new-group"><button aria-label="' + Drupal.t('Add a CKEditor button group to the end of this row.') + '">' + Drupal.t('Add group') + '</button></li>';
|
||||
};
|
||||
|
||||
})(jQuery, Drupal, drupalSettings, _);
|
||||
|
|
|
@ -71,7 +71,7 @@ interface CKEditorPluginInterface extends PluginInspectionInterface {
|
|||
* Note: this does not use a Drupal library because this uses CKEditor's API,
|
||||
* see http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.resourceManager.html#addExternal.
|
||||
*
|
||||
* @return string|FALSE
|
||||
* @return string|false
|
||||
* The Drupal root-relative path to the file, FALSE if an internal plugin.
|
||||
*/
|
||||
public function getFile();
|
||||
|
|
|
@ -115,7 +115,7 @@ class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurab
|
|||
*
|
||||
* @param string $styles
|
||||
* The "styles" setting.
|
||||
* @return array|FALSE
|
||||
* @return array|false
|
||||
* An array containing the "stylesSet" configuration, or FALSE when the
|
||||
* syntax is invalid.
|
||||
*/
|
||||
|
|
|
@ -55,7 +55,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
$this->drupalGet('admin/config/content/formats/manage/filtered_html');
|
||||
|
||||
// Ensure no Editor config entity exists yet.
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertFalse($editor, 'No Editor config entity exists yet.');
|
||||
|
||||
// Verify the "Text Editor" <select> when a text editor is available.
|
||||
|
@ -111,7 +111,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
|
||||
// Keep the "CKEditor" editor selected and click the "Configure" button.
|
||||
$this->drupalPostAjaxForm(NULL, $edit, 'editor_configure');
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertFalse($editor, 'No Editor config entity exists yet.');
|
||||
|
||||
// Ensure that drupalSettings is correct.
|
||||
|
@ -142,7 +142,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
// Ensure an Editor object exists now, with the proper settings.
|
||||
$expected_settings = $expected_default_settings;
|
||||
$expected_settings['plugins']['stylescombo']['styles'] = '';
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists now.');
|
||||
$this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
|
||||
|
||||
|
@ -153,7 +153,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
);
|
||||
$this->drupalPostForm(NULL, $edit, t('Save configuration'));
|
||||
$expected_settings['plugins']['stylescombo']['styles'] = "h1.title|Title\np.callout|Callout\n\n";
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
|
||||
$this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
|
||||
|
||||
|
@ -169,7 +169,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
'editor[settings][toolbar][button_groups]' => json_encode($expected_settings['toolbar']['rows']),
|
||||
);
|
||||
$this->drupalPostForm(NULL, $edit, t('Save configuration'));
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
|
||||
$this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
|
||||
|
||||
|
@ -197,7 +197,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
$this->drupalGet('admin/config/content/formats/manage/filtered_html');
|
||||
$ultra_llama_mode_checkbox = $this->xpath('//input[@type="checkbox" and @name="editor[settings][plugins][llama_contextual_and_button][ultra_llama_mode]" and not(@checked)]');
|
||||
$this->assertTrue(count($ultra_llama_mode_checkbox) === 1, 'The "Ultra llama mode" checkbox exists and is not checked.');
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
|
||||
$this->assertEqual($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
|
||||
|
||||
|
@ -211,7 +211,7 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
$ultra_llama_mode_checkbox = $this->xpath('//input[@type="checkbox" and @name="editor[settings][plugins][llama_contextual_and_button][ultra_llama_mode]" and @checked="checked"]');
|
||||
$this->assertTrue(count($ultra_llama_mode_checkbox) === 1, 'The "Ultra llama mode" checkbox exists and is checked.');
|
||||
$expected_settings['plugins']['llama_contextual_and_button']['ultra_llama_mode'] = TRUE;
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
|
||||
$this->assertEqual($expected_settings, $editor->getSettings());
|
||||
}
|
||||
|
@ -245,9 +245,9 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
'editor[editor]' => 'ckeditor',
|
||||
);
|
||||
$this->drupalPostAjaxForm(NULL, $edit, 'editor_configure');
|
||||
$filter_format = entity_load('filter_format', 'amazing_format');
|
||||
$filter_format = FilterFormat::load('amazing_format');
|
||||
$this->assertFalse($filter_format, 'No FilterFormat config entity exists yet.');
|
||||
$editor = entity_load('editor', 'amazing_format');
|
||||
$editor = Editor::load('amazing_format');
|
||||
$this->assertFalse($editor, 'No Editor config entity exists yet.');
|
||||
|
||||
// Ensure the toolbar buttons configuration value is initialized to the
|
||||
|
@ -270,13 +270,13 @@ class CKEditorAdminTest extends WebTestBase {
|
|||
$this->drupalPostForm(NULL, $edit, t('Save configuration'));
|
||||
|
||||
// Ensure a FilterFormat object exists now.
|
||||
$filter_format = entity_load('filter_format', 'amazing_format');
|
||||
$filter_format = FilterFormat::load('amazing_format');
|
||||
$this->assertTrue($filter_format instanceof FilterFormatInterface, 'A FilterFormat config entity exists now.');
|
||||
|
||||
// Ensure an Editor object exists now, with the proper settings.
|
||||
$expected_settings = $default_settings;
|
||||
$expected_settings['plugins']['stylescombo']['styles'] = '';
|
||||
$editor = entity_load('editor', 'amazing_format');
|
||||
$editor = Editor::load('amazing_format');
|
||||
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists now.');
|
||||
$this->assertEqual($this->castSafeStrings($expected_settings), $this->castSafeStrings($editor->getSettings()), 'The Editor config entity has the correct settings.');
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ class CKEditorLoadingTest extends WebTestBase {
|
|||
$this->drupalGet('node/add/article');
|
||||
list($settings, $editor_settings_present, $editor_js_present, $body, $format_selector) = $this->getThingsToCheck();
|
||||
$ckeditor_plugin = $this->container->get('plugin.manager.editor')->createInstance('ckeditor');
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$expected = array('formats' => array('filtered_html' => array(
|
||||
'format' => 'filtered_html',
|
||||
'editor' => 'ckeditor',
|
||||
|
|
|
@ -69,7 +69,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
* Tests CKEditor::getJSSettings().
|
||||
*/
|
||||
function testGetJSSettings() {
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
|
||||
// Default toolbar.
|
||||
$expected_config = $this->getDefaultInternalConfig() + array(
|
||||
|
@ -217,7 +217,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
* Tests CKEditor::buildToolbarJSSetting().
|
||||
*/
|
||||
function testBuildToolbarJSSetting() {
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
|
||||
// Default toolbar.
|
||||
$expected = $this->getDefaultToolbarConfig();
|
||||
|
@ -248,7 +248,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
* Tests CKEditor::buildContentsCssJSSetting().
|
||||
*/
|
||||
function testBuildContentsCssJSSetting() {
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
|
||||
// Default toolbar.
|
||||
$expected = $this->getDefaultContentsCssConfig();
|
||||
|
@ -285,7 +285,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
* Tests Internal::getConfig().
|
||||
*/
|
||||
function testInternalGetConfig() {
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$internal_plugin = $this->container->get('plugin.manager.ckeditor.plugin')->createInstance('internal');
|
||||
|
||||
// Default toolbar.
|
||||
|
@ -306,7 +306,7 @@ class CKEditorTest extends KernelTestBase {
|
|||
* Tests StylesCombo::getConfig().
|
||||
*/
|
||||
function testStylesComboGetConfig() {
|
||||
$editor = entity_load('editor', 'filtered_html');
|
||||
$editor = Editor::load('filtered_html');
|
||||
$stylescombo_plugin = $this->container->get('plugin.manager.ckeditor.plugin')->createInstance('stylescombo');
|
||||
|
||||
// Styles dropdown/button enabled: new setting should be present.
|
||||
|
|
Reference in a new issue