You are here

public function ExplodeTest::testExplodeWithSingleValueAndLimit in Tamper 8

Text explode with limit.

File

tests/src/Unit/Plugin/Tamper/ExplodeTest.php, line 45

Class

ExplodeTest
Tests the explode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testExplodeWithSingleValueAndLimit() {
  $original = 'foo,bar,baz,zip';
  $expected = [
    'foo',
    'bar,baz,zip',
  ];
  $this
    ->assertArrayEquals($expected, $this
    ->getPluginWithLimit()
    ->tamper($original));
}