You are here

public function StripTagsTest::testAllowedTags in Tamper 8

Test the plugin with tags allowed.

File

tests/src/Unit/Plugin/Tamper/StripTagsTest.php, line 38

Class

StripTagsTest
Tests the strip tags plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testAllowedTags() {
  $config = [
    StripTags::SETTING_ALLOWED_TAGS => '<i>',
  ];
  $this->plugin
    ->setConfiguration($config);
  $this
    ->assertEquals('sdfsdfsdfsdf<i>sdfsdf</i>sdfsdfsdfsdf', $this->plugin
    ->tamper('sdfsdfsdfsdf<i>sdfsdf</i><b>sdfs</b>dfsdfsdf'));
}