You are here

public function RowTest::testGetSetIdMap in Drupal 8

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

Tests getting/setting the ID Map.

@covers ::setIdMap @covers ::getIdMap

File

core/modules/migrate/tests/src/Unit/RowTest.php, line 214

Class

RowTest
@coversDefaultClass \Drupal\migrate\Row @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

public function testGetSetIdMap() {
  $row = new Row($this->testValues, $this->testSourceIds);
  $test_id_map = [
    'original_hash' => '',
    'hash' => '',
    'source_row_status' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
  ];
  $row
    ->setIdMap($test_id_map);
  $this
    ->assertEquals($test_id_map, $row
    ->getIdMap());
}