function EditorAdminTest::addEditorToNewFormat
Same name in other branches
- 8.9.x core/modules/editor/tests/src/Functional/EditorAdminTest.php \Drupal\Tests\editor\Functional\EditorAdminTest::addEditorToNewFormat()
- 10 core/modules/editor/tests/src/Functional/EditorAdminTest.php \Drupal\Tests\editor\Functional\EditorAdminTest::addEditorToNewFormat()
- 11.x core/modules/editor/tests/src/Functional/EditorAdminTest.php \Drupal\Tests\editor\Functional\EditorAdminTest::addEditorToNewFormat()
Adds an editor to a new format using the UI.
Parameters
string $format_id: The format id.
string $format_name: The format name.
2 calls to EditorAdminTest::addEditorToNewFormat()
- EditorAdminTest::testAddEditorToNewFormat in core/
modules/ editor/ tests/ src/ Functional/ EditorAdminTest.php - Tests adding a text editor to a new text format.
- EditorAdminTest::testDisableFormatWithEditor in core/
modules/ editor/ tests/ src/ Functional/ EditorAdminTest.php - Tests format disabling.
File
-
core/
modules/ editor/ tests/ src/ Functional/ EditorAdminTest.php, line 184
Class
- EditorAdminTest
- Tests administration of text editors.
Namespace
Drupal\Tests\editor\FunctionalCode
protected function addEditorToNewFormat($format_id, $format_name) {
$this->enableUnicornEditor();
$this->drupalLogin($this->adminUser);
$this->drupalGet('admin/config/content/formats/add');
// Configure the text format name.
$edit = [
'name' => $format_name,
'format' => $format_id,
];
$edit += $this->selectUnicornEditor();
$this->submitForm($edit, 'Save configuration');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.