Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / comment / tests / src / Kernel / Plugin / migrate / source / d7 / CommentTest.php
index 9d9760bf905901dd85c906089b43fc905dfd1710..dc9948956318cc2ded877a85b4c2126e46ee2f74 100644 (file)
@@ -60,6 +60,16 @@ class CommentTest extends MigrateSqlSourceTestBase {
         'translate' => '0',
       ],
     ];
+    $tests[0]['source_data']['field_config'] = [
+      [
+        'id' => '1',
+        'translatable' => '0',
+      ],
+      [
+        'id' => '2',
+        'translatable' => '1',
+      ],
+    ];
     $tests[0]['source_data']['field_config_instance'] = [
       [
         'id' => '14',
@@ -70,6 +80,15 @@ class CommentTest extends MigrateSqlSourceTestBase {
         'data' => 'a:0:{}',
         'deleted' => '0',
       ],
+      [
+        'id' => '15',
+        'field_id' => '2',
+        'field_name' => 'subject_field',
+        'entity_type' => 'comment',
+        'bundle' => 'comment_node_test_content_type',
+        'data' => 'a:0:{}',
+        'deleted' => '0',
+      ],
     ];
     $tests[0]['source_data']['field_data_comment_body'] = [
       [
@@ -84,6 +103,26 @@ class CommentTest extends MigrateSqlSourceTestBase {
         'comment_body_format' => 'filtered_html',
       ],
     ];
+    $tests[0]['source_data']['field_data_subject_field'] = [
+      [
+        'entity_type' => 'comment',
+        'bundle' => 'comment_node_test_content_type',
+        'deleted' => '0',
+        'entity_id' => '1',
+        'revision_id' => '1',
+        'language' => 'und',
+        'delta' => '0',
+        'subject_field_value' => 'A comment (subject_field)',
+        'subject_field_format' => NULL,
+      ],
+    ];
+    $tests[0]['source_data']['system'] = [
+      [
+        'name' => 'title',
+        'type' => 'module',
+        'status' => 1,
+      ],
+    ];
 
     // The expected results.
     $tests[0]['expected_data'] = [
@@ -92,7 +131,7 @@ class CommentTest extends MigrateSqlSourceTestBase {
         'pid' => '0',
         'nid' => '1',
         'uid' => '1',
-        'subject' => 'A comment',
+        'subject' => 'A comment (subject_field)',
         'hostname' => '::1',
         'created' => '1421727536',
         'changed' => '1421727536',