function EditorAdminTest::testAddEditorToExistingFormat
Same name in other branches
- 9 core/modules/editor/tests/src/Functional/EditorAdminTest.php \Drupal\Tests\editor\Functional\EditorAdminTest::testAddEditorToExistingFormat()
- 8.9.x core/modules/editor/tests/src/Functional/EditorAdminTest.php \Drupal\Tests\editor\Functional\EditorAdminTest::testAddEditorToExistingFormat()
- 10 core/modules/editor/tests/src/Functional/EditorAdminTest.php \Drupal\Tests\editor\Functional\EditorAdminTest::testAddEditorToExistingFormat()
Tests adding a text editor to an existing text format.
File
-
core/
modules/ editor/ tests/ src/ Functional/ EditorAdminTest.php, line 83
Class
- EditorAdminTest
- Tests administration of text editors.
Namespace
Drupal\Tests\editor\FunctionalCode
public function testAddEditorToExistingFormat() : void {
$this->enableUnicornEditor();
$this->drupalLogin($this->adminUser);
$this->drupalGet('admin/config/content/formats/manage/filtered_html');
$edit = $this->selectUnicornEditor();
// Configure Unicorn Editor's setting to another value.
$edit['editor[settings][ponies_too]'] = FALSE;
$this->submitForm($edit, 'Save configuration');
$this->verifyUnicornEditorConfiguration('filtered_html', FALSE);
// Switch back to 'None' and check the Unicorn Editor's settings are gone.
$edit = [
'editor[editor]' => '',
];
$this->submitForm($edit, 'Configure');
$this->assertSession()
->fieldNotExists('editor[settings][ponies_too]');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.