diff --git a/composer.lock b/composer.lock index da9771e..c6a9189 100644 --- a/composer.lock +++ b/composer.lock @@ -2420,29 +2420,30 @@ }, { "name": "twig/twig", - "version": "v1.25.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "f16a634ab08d87e520da5671ec52153d627f10f6" + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f16a634ab08d87e520da5671ec52153d627f10f6", - "reference": "f16a634ab08d87e520da5671ec52153d627f10f6", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9935b662e24d6e634da88901ab534cc12e8c728f", + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f", "shasum": "" }, "require": { "php": ">=5.2.7" }, "require-dev": { + "psr/container": "^1.0", "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.25-dev" + "dev-master": "1.32-dev" } }, "autoload": { @@ -2477,7 +2478,7 @@ "keywords": [ "templating" ], - "time": "2016-09-21T23:05:12+00:00" + "time": "2017-02-27T00:07:03+00:00" }, { "name": "wikimedia/composer-merge-plugin", diff --git a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php similarity index 87% rename from core/modules/ckeditor/src/Tests/CKEditorAdminTest.php rename to core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php index 669dc5f..ff36c0f 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php +++ b/core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php @@ -1,19 +1,19 @@ xpath('//select[@name="editor[editor]"]'); $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]'); $options = $this->xpath('//select[@name="editor[editor]"]/option'); - $this->assertTrue(count($select) === 1, 'The Text Editor select exists.'); - $this->assertTrue(count($select_is_disabled) === 0, 'The Text Editor select is not disabled.'); - $this->assertTrue(count($options) === 2, 'The Text Editor select has two options.'); - $this->assertTrue(((string) $options[0]) === 'None', 'Option 1 in the Text Editor select is "None".'); - $this->assertTrue(((string) $options[1]) === 'CKEditor', 'Option 2 in the Text Editor select is "CKEditor".'); - $this->assertTrue(((string) $options[0]['selected']) === 'selected', 'Option 1 ("None") is selected.'); + $this->assertSame(1, count($select), 'The Text Editor select exists.'); + $this->assertSame(0, count($select_is_disabled), 'The Text Editor select is not disabled.'); + $this->assertSame(2, count($options), 'The Text Editor select has two options.'); + $this->assertSame('None', $options[0]->getText(), 'Option 1 in the Text Editor select is "None".'); + $this->assertSame('CKEditor', $options[1]->getText(), 'Option 2 in the Text Editor select is "CKEditor".'); + $this->assertSame('selected', $options[0]->getAttribute('selected'), 'Option 1 ("None") is selected.'); // Select the "CKEditor" editor and click the "Save configuration" button. $edit = [ @@ -110,7 +110,7 @@ public function testExistingFormat() { $this->assertIdentical($this->castSafeStrings($ckeditor->getDefaultSettings()), $expected_default_settings); // Keep the "CKEditor" editor selected and click the "Configure" button. - $this->drupalPostAjaxForm(NULL, $edit, 'editor_configure'); + $this->drupalPostForm(NULL, $edit, 'editor_configure'); $editor = Editor::load('filtered_html'); $this->assertFalse($editor, 'No Editor config entity exists yet.'); @@ -120,8 +120,10 @@ public function testExistingFormat() { '#editor' => Editor::create(['editor' => 'ckeditor']), '#plugins' => $this->container->get('plugin.manager.ckeditor.plugin')->getButtons(), ]; + $settings = $this->getDrupalSettings(); + $expected = $settings['ckeditor']['toolbarAdmin']; $this->assertEqual( - $this->drupalSettings['ckeditor']['toolbarAdmin'], + $expected, $this->container->get('renderer')->renderPlain($ckeditor_settings_toolbar), 'CKEditor toolbar settings are rendered as part of drupalSettings.' ); @@ -230,12 +232,12 @@ public function testNewFormat() { $select = $this->xpath('//select[@name="editor[editor]"]'); $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]'); $options = $this->xpath('//select[@name="editor[editor]"]/option'); - $this->assertTrue(count($select) === 1, 'The Text Editor select exists.'); - $this->assertTrue(count($select_is_disabled) === 0, 'The Text Editor select is not disabled.'); - $this->assertTrue(count($options) === 2, 'The Text Editor select has two options.'); - $this->assertTrue(((string) $options[0]) === 'None', 'Option 1 in the Text Editor select is "None".'); - $this->assertTrue(((string) $options[1]) === 'CKEditor', 'Option 2 in the Text Editor select is "CKEditor".'); - $this->assertTrue(((string) $options[0]['selected']) === 'selected', 'Option 1 ("None") is selected.'); + $this->assertSame(1, count($select), 'The Text Editor select exists.'); + $this->assertSame(0, count($select_is_disabled), 'The Text Editor select is not disabled.'); + $this->assertSame(2, count($options), 'The Text Editor select has two options.'); + $this->assertSame('None', $options[0]->getText(), 'Option 1 in the Text Editor select is "None".'); + $this->assertSame('CKEditor', $options[1]->getText(), 'Option 2 in the Text Editor select is "CKEditor".'); + $this->assertSame('selected', $options[0]->getAttribute('selected'), 'Option 1 ("None") is selected.'); // Name our fancy new text format, select the "CKEditor" editor and click // the "Configure" button. @@ -244,7 +246,7 @@ public function testNewFormat() { 'format' => 'amazing_format', 'editor[editor]' => 'ckeditor', ]; - $this->drupalPostAjaxForm(NULL, $edit, 'editor_configure'); + $this->drupalPostForm(NULL, $edit, 'editor_configure'); $filter_format = FilterFormat::load('amazing_format'); $this->assertFalse($filter_format, 'No FilterFormat config entity exists yet.'); $editor = Editor::load('amazing_format'); @@ -258,7 +260,9 @@ public function testNewFormat() { $this->assertFieldByName('editor[settings][toolbar][button_groups]', $expected_buttons_value); // Regression test for https://www.drupal.org/node/2606460. - $this->assertTrue(strpos($this->drupalSettings['ckeditor']['toolbarAdmin'], '
  • bold
  • ') !== FALSE); + $settings = $this->getDrupalSettings(); + $expected = $settings['ckeditor']['toolbarAdmin']; + $this->assertTrue(strpos($expected, '
  • bold
  • ') !== FALSE); // Ensure the styles textarea exists and is initialized empty. $styles_textarea = $this->xpath('//textarea[@name="editor[settings][plugins][stylescombo][styles]"]'); diff --git a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php similarity index 98% rename from core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php rename to core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php index 438aeba..9d66071 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php +++ b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php @@ -1,17 +1,17 @@