/**
* Verifies unicorn editor configuration.
*
* @param string $format_id
* The format machine name.
* @param bool $ponies_too
* The expected value of the ponies_too setting.
*/
protected function verifyUnicornEditorConfiguration($format_id,
$ponies_too = TRUE
) { $editor =
editor_load($format_id);
$settings =
$editor->
getSettings();
$this->
assertSame('unicorn',
$editor->
getEditor(), 'The text editor is configured correctly.'
);
$this->
assertSame($ponies_too,
$settings['ponies_too'
], 'The text editor settings are stored correctly.'
);
$this->
drupalGet('admin/config/content/formats/manage/' .
$format_id);
$select =
$this->
assertSession()->
selectExists('editor[editor]'
);
$this->
assertFalse($select->
hasAttribute('disabled'
));
$options =
$select->
findAll('css', 'option'
);
$this->
assertCount(2,
$options);
$this->
assertTrue($options[1
]->
isSelected(), 'Option 2 ("Unicorn Editor") is selected.'
);
}}