You are here

public function TrimTest::testTrimLeftSide in Tamper 8

Test trimming left side.

File

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

Class

TrimTest
Tests the trim plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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