You are here

protected function RowTest::createRowWithDestinationProperties 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::createRowWithDestinationProperties()

Create a row and load it with destination properties.

Parameters

array $source_properties: The source property array.

array $source_ids: The source ids array.

array $destination_properties: The destination properties to load.

bool $is_stub: Whether this row is a stub row, defaults to FALSE.

Return value

\Drupal\migrate\Row The row, populated with destination properties.

2 calls to RowTest::createRowWithDestinationProperties()
RowTest::testGet in core/modules/migrate/tests/src/Unit/RowTest.php
Test getting source and destination properties.
RowTest::testGetMultiple in core/modules/migrate/tests/src/Unit/RowTest.php
Test getting multiple source and destination properties.

File

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

Class

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

Namespace

Drupal\Tests\migrate\Unit

Code

protected function createRowWithDestinationProperties(array $source_properties, array $source_ids, array $destination_properties, $is_stub = FALSE) {
  $row = new Row($source_properties, $source_ids, $is_stub);
  foreach ($destination_properties as $key => $property) {
    $row
      ->setDestinationProperty($key, $property);
  }
  return $row;
}