function ExplodeTest::testTransformLimit
Same name 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()
- 11.x 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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.