function InternalTest::testFormatTagsSettings

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

Test the format tags settings.

@dataProvider formatTagsSettingsTestCases

File

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

Class

InternalTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21ckeditor%21src%21Plugin%21CKEditorPlugin%21Internal.php/class/Internal/8.9.x" title="Defines the &quot;internal&quot; plugin (i.e. core plugins part of our CKEditor build)." class="local">\Drupal\ckeditor\Plugin\CKEditorPlugin\Internal</a>

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.