You are here

public function StaticMapTest::testMapWithSourceList in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithSourceList()

Tests map when the source is a list.

File

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

Class

StaticMapTest
Tests the static map process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

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