/**
* {@inheritdoc}
*/
- public static $modules = ['language', 'content_translation', 'menu_ui'];
+ public static $modules = [
+ 'language',
+ 'content_translation',
+ 'menu_ui',
+ // Required for translation migrations.
+ 'migrate_drupal_multilingual',
+ ];
/**
* {@inheritdoc}
$this->assertCount(2, $node->field_company);
$this->assertSame('Klingon Empire', $node->field_company[0]->entity->label());
$this->assertSame('Romulan Empire', $node->field_company[1]->entity->label());
+ $this->assertCount(1, $node->field_company_2);
+ $this->assertSame('Klingon Empire', $node->field_company_2[0]->entity->label());
+ $this->assertCount(1, $node->field_company_3);
+ $this->assertSame('Romulan Empire', $node->field_company_3[0]->entity->label());
// Test that user reference field values were migrated.
$this->assertCount(1, $node->field_commander);
$default_connection = \Drupal::database();
$default_connection->truncate($table_name)->execute();
if ($new_row) {
- $hash = $migration->getIdMap()->getSourceIDsHash(['nid' => $new_row['sourceid1']]);
+ $hash = $migration->getIdMap()->getSourceIdsHash(['nid' => $new_row['sourceid1']]);
$new_row['source_ids_hash'] = $hash;
$default_connection->insert($table_name)
->fields($new_row)