function HTMLRestrictionsTest::testRepresentations

Same name and namespace in other branches
  1. 11.x core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php \Drupal\Tests\ckeditor5\Unit\HTMLRestrictionsTest::testRepresentations()
  2. 10 core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php \Drupal\Tests\ckeditor5\Unit\HTMLRestrictionsTest::testRepresentations()
  3. 9 core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php \Drupal\Tests\ckeditor5\Unit\HTMLRestrictionsTest::testRepresentations()

Tests representations.

@legacy-covers ::toCKEditor5ElementsArray @legacy-covers ::toFilterHtmlAllowedTagsString @legacy-covers ::toGeneralHtmlSupportConfig

Attributes

#[DataProvider('providerRepresentations')]

File

core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php, line 656

Class

HTMLRestrictionsTest
Tests Drupal\ckeditor5\HTMLRestrictions.

Namespace

Drupal\Tests\ckeditor5\Unit

Code

public function testRepresentations(HTMLRestrictions $restrictions, array $expected_elements_array, string $expected_allowed_html_string, array $expected_ghs_config) : void {
  $this->assertSame($expected_elements_array, $restrictions->toCKEditor5ElementsArray());
  $this->assertSame($expected_allowed_html_string, $restrictions->toFilterHtmlAllowedTagsString());
  $this->assertSame($expected_ghs_config, $restrictions->toGeneralHtmlSupportConfig());
}

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