verifyUnicornEditorConfiguration example

/** * Tests adding a text editor to an existing text format. */
  public function testAddEditorToExistingFormat() {
    $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]');
  }

  /** * Tests adding a text editor to a new text format. */
Home | Imprint | This part of the site doesn't use cookies.