public function ExplodeTest::testTransformLimit in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testTransformLimit()
- 10 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testTransformLimit()
Test explode transform process works with a limit.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ ExplodeTest.php, line 38
Class
- ExplodeTest
- Tests the Explode process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testTransformLimit() {
$plugin = new Explode([
'delimiter' => '_',
'limit' => 2,
], 'map', []);
$value = $plugin
->transform('foo_bar_tik', $this->migrateExecutable, $this->row, 'destination_property');
$this
->assertSame([
'foo',
'bar_tik',
], $value);
}