Explode example


class ExplodeTest extends MigrateProcessTestCase {

  /** * {@inheritdoc} */
  protected function setUp(): void {
    $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);
  }

  
Home | Imprint | This part of the site doesn't use cookies.