function StaticMapTest::testMapWithSourceString

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithSourceString()
  2. 8.9.x core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithSourceString()
  3. 10 core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithSourceString()

Tests map when the source is a string.

File

core/modules/migrate/tests/src/Unit/process/StaticMapTest.php, line 31

Class

StaticMapTest
Tests the static map process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testMapWithSourceString() : void {
    $value = $this->plugin
        ->transform('foo', $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertSame([
        'bar' => 'baz',
    ], $value);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.