function InternalTest::testFormatTagsSettings

Same name and namespace in other branches
  1. 8.9.x core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php \Drupal\Tests\ckeditor\Kernel\Plugin\CKEditorPlugin\InternalTest::testFormatTagsSettings()

Tests the format tags settings.

@dataProvider formatTagsSettingsTestCases

File

core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php, line 92

Class

InternalTest
@coversDefaultClass \Drupal\ckeditor\Plugin\CKEditorPlugin\Internal[[api-linebreak]]

Namespace

Drupal\Tests\ckeditor\Kernel\Plugin\CKEditorPlugin

Code

public function testFormatTagsSettings($filter_plugins, $expected_format_tags) {
  foreach ($filter_plugins as $filter_plugin_id => $filter_plugin_settings) {
    $this->format
      ->setFilterConfig($filter_plugin_id, $filter_plugin_settings);
  }
  $this->format
    ->save();
  $internal_plugin = $this->ckeditorPluginManager
    ->createInstance('internal', []);
  $plugin_config = $internal_plugin->getConfig($this->editor);
  $this->assertEquals($expected_format_tags, explode(';', $plugin_config['format_tags']));
}

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