You are here

public function ExplodeTest::testExplodeWithSingleValue in Tamper 8

Test explode.

File

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

Class

ExplodeTest
Tests the explode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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