Issue #1943624 by joelpittet, Berdir, Wim Leers, xjm: Fixed...
Issue #1943624 by joelpittet, Berdir, Wim Leers, xjm: Fixed EntityMalformedException when enabling a text editor while creating a new text format, because Editor depends on FilterFormat.
@@ -62,15 +65,57 @@ function testWithoutEditorAvailable() {
$this->assertTrue(count($select)===1,'The Text Editor select exists.');
$this->assertTrue(count($select_is_disabled)===1,'The Text Editor select is disabled.');
$this->assertTrue(count($options)===1,'The Text Editor select has only one option.');
$this->assertTrue(((string)$options[0])==='None','Option 1 in the he Text Editor select is "None".');
$this->assertTrue(((string)$options[0])==='None','Option 1 in the Text Editor select is "None".');
$this->assertRaw(t('This option is disabled because no modules that provide a text editor are currently enabled.'),'Description for select present that tells users to install a text editor module.');
}
/**
* Tests adding a text editor to an existing text format.
$select_is_disabled=$this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]');
...
...
@@ -78,8 +123,8 @@ function testWithoutEditorAvailable() {
$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 he Text Editor select is "None".');
$this->assertTrue(((string)$options[1])==='Unicorn Editor','Option 2 in the he Text Editor select is "Unicorn Editor".');
$this->assertTrue(((string)$options[0])==='None','Option 1 in the Text Editor select is "None".');
$this->assertTrue(((string)$options[1])==='Unicorn Editor','Option 2 in the Text Editor select is "Unicorn Editor".');
$this->assertTrue(((string)$options[0]['selected'])==='selected','Option 1 ("None") is selected.');
// Ensure the none option is selected
$this->assertNoRaw(t('This option is disabled because no modules that provide a text editor are currently enabled.'),'Description for select absent that tells users to install a text editor module.');
...
...
@@ -91,20 +136,26 @@ function testWithoutEditorAvailable() {
$this->assertIdentical($editor->editor,'unicorn','The text editor is configured correctly.');
$this->assertIdentical($editor->settings['foo'],'baz','The text editor settings are stored correctly.');
$this->assertIdentical($editor->settings['foo'],$foo,'The text editor settings are stored correctly.');
$this->assertIdentical($editor->settings['ponies too'],true,'The text editor defaults are retrieved correctly.');
$this->assertIdentical($editor->settings['rainbows'],true,'The text editor defaults added by hook_editor_settings_defaults() are retrieved correctly.');
$this->assertIdentical($editor->settings['sparkles'],false,'The text editor defaults modified by hook_editor_settings_defaults_alter() are retrieved correctly.');