function SourceEditingTest::doTestAllowingExtraAttributes

Same name in other branches
  1. 10 core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\SourceEditingTest::doTestAllowingExtraAttributes()

Tests extra attributes with a specific data set.

1 call to SourceEditingTest::doTestAllowingExtraAttributes()
SourceEditingTest::testAllowingExtraAttributes in core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php
Tests allowing extra attributes on already supported tags using GHS.

File

core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php, line 117

Class

SourceEditingTest
@coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig @group ckeditor5 @internal

Namespace

Drupal\Tests\ckeditor5\FunctionalJavascript

Code

protected function doTestAllowingExtraAttributes(string $original_markup, string $expected_markup, string $allowed_elements_string) : void {
    $this->host->body->value = $original_markup;
    $this->host
        ->save();
    $this->drupalGet($this->host
        ->toUrl('edit-form'));
    $this->waitForEditor();
    $this->assertSame($expected_markup, $this->getEditorDataAsHtmlString());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.