X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fnode%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateNodeTest.php;fp=web%2Fcore%2Fmodules%2Fnode%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateNodeTest.php;h=700311c87116e8bd9683b45a8fe4a9478d1f2b7e;hp=ce4ce76e968f29b0ecfbbe1c5e33b54ae55764f1;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php b/web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php index ce4ce76e9..700311c87 100644 --- a/web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php +++ b/web/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php @@ -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)