StaticMap example


class StaticMapTest extends MigrateProcessTestCase {

  /** * {@inheritdoc} */
  protected function setUp(): void {
    $configuration['map']['foo']['bar'] = 'baz';
    $this->plugin = new StaticMap($configuration, 'map', []);
    parent::setUp();
  }

  /** * Tests map when the source is a string. */
  public function testMapWithSourceString() {
    $value = $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertSame(['bar' => 'baz']$value);
  }

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