You are here

protected function EditorAdminTest::addEditorToNewFormat in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/editor/src/Tests/EditorAdminTest.php \Drupal\editor\Tests\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/src/Tests/EditorAdminTest.php
Tests adding a text editor to a new text format.
EditorAdminTest::testDisableFormatWithEditor in core/modules/editor/src/Tests/EditorAdminTest.php
Tests format disabling.

File

core/modules/editor/src/Tests/EditorAdminTest.php, line 165
Contains \Drupal\editor\Tests\EditorAdminTest.

Class

EditorAdminTest
Tests administration of text editors.

Namespace

Drupal\editor\Tests

Code

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 = array(
    'name' => $format_name,
    'format' => $format_id,
  );
  $edit += $this
    ->selectUnicornEditor();
  $this
    ->drupalPostForm(NULL, $edit, t('Save configuration'));
}