diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/core/modules/migrate_drupal/tests/fixtures/drupal6.php index 1ca67a5..1b8bf8e 100644 --- a/core/modules/migrate_drupal/tests/fixtures/drupal6.php +++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php @@ -3420,9 +3420,9 @@ 'field_test_three_value' => '101.00', 'field_test_identical1_value' => NULL, 'field_test_identical2_value' => NULL, - 'field_test_link_url' => 'http://www.example.com/buy-one-upon-a-time', + 'field_test_link_url' => 'node/10', 'field_test_link_title' => 'Buy it now', - 'field_test_link_attributes' => 'a:1:{s:6:"target";s:6:"_blank";}', + 'field_test_link_attributes' => 's:32:"a:1:{s:6:"target";s:6:"_blank";}";', 'field_test_date_value' => NULL, 'field_test_datestamp_value' => NULL, 'field_test_datetime_value' => NULL, @@ -3440,7 +3440,7 @@ 'field_test_imagefield_fid' => NULL, 'field_test_imagefield_list' => NULL, 'field_test_imagefield_data' => NULL, - 'field_test_text_single_checkbox2_value' => NULL, + 'field_test_text_single_checkbox2_value' => 'Off', )) ->execute(); diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php index 29bc9dc..191cee8 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php @@ -79,6 +79,13 @@ public function testNode() { $this->assertIdentical('Drupal Groups', $node->field_test_link->title); $this->assertIdentical([], $node->field_test_link->options['attributes']); + // Test that a link field with an internal link is migrated. + $node = Node::load(9); + $this->assertIdentical('internal:/node/10', $node->field_test_link->uri); + $this->assertIdentical('But it now', $node->field_test_link->title); + $attributes = 's:32:"a:1:{s:6:"target";s:6:"_blank";}'; + $this->assertIdentical($attributes, $node->field_test_link->options['attributes']); + // Rerun migration with invalid link attributes and a different URL and // title. If only the attributes are changed the error does not occur. Database::getConnection('default', 'migrate')