You are here

public function TrimTest::testTrimWithCharacterMask in Tamper 8

Test trimming with character mask.

File

tests/src/Unit/Plugin/Tamper/TrimTest.php, line 60

Class

TrimTest
Tests the trim plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testTrimWithCharacterMask() {
  $config = [
    Trim::SETTING_CHARACTER => '$',
    Trim::SETTING_SIDE => 'trim',
  ];
  $plugin = new Trim($config, 'trim', [], $this
    ->getMockSourceDefinition());
  $this
    ->assertEquals('asdfasf', $plugin
    ->tamper('$$asdfasf$$'));
}