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\TamperCode
public function testExplodeWithSingleValueAndLimit() {
$original = 'foo,bar,baz,zip';
$expected = [
'foo',
'bar,baz,zip',
];
$this
->assertArrayEquals($expected, $this
->getPluginWithLimit()
->tamper($original));
}