Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / node / tests / src / Kernel / Migrate / d6 / MigrateNodeTest.php
index ce4ce76e968f29b0ecfbbe1c5e33b54ae55764f1..700311c87116e8bd9683b45a8fe4a9478d1f2b7e 100644 (file)
@@ -19,7 +19,13 @@ class MigrateNodeTest extends MigrateNodeTestBase {
   /**
    * {@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}
@@ -94,6 +100,10 @@ class MigrateNodeTest extends MigrateNodeTestBase {
     $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);
@@ -223,7 +233,7 @@ class MigrateNodeTest extends MigrateNodeTestBase {
     $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)