$configuration =
[ 'delimiter' => ',',
];
$this->plugin =
new Explode($configuration, 'map',
[]);
parent::
setUp();
} /**
* Tests explode transform process works.
*/
public function testTransform() { $value =
$this->plugin->
transform('foo,bar,tik',
$this->migrateExecutable,
$this->row, 'destination_property'
);
$this->
assertSame(['foo', 'bar', 'tik'
],
$value);
} /**
* Tests explode transform process works with a limit.
*/
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);
}