Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / file / tests / src / Kernel / Plugin / migrate / source / d6 / FileTest.php
index cc8c9b36faf048ea4fd0c64564a34236de915ea0..33c430e2fdf276d11a5fde7883030b53c5d77eee 100644 (file)
@@ -46,11 +46,42 @@ class FileTest extends MigrateSqlSourceTestBase {
         'status' => 1,
         'timestamp' => 1382255662,
       ],
+      [
+        'fid' => 3,
+        'uid' => 1,
+        'filename' => 'migrate-test-file-3.pdf',
+        'filepath' => '/tmp/migrate-test-file-3.pdf',
+        'filemime' => 'application/pdf',
+        'filesize' => 304124,
+        'status' => 1,
+        'timestamp' => 1382277662,
+      ],
     ];
 
-    // The expected results are identical to the source data.
-    $tests[0]['expected_data'] = $tests[0]['source_data']['files'];
-
+    // The expected results are the same as the source data but excluding
+    // the temporary file.
+    $tests[0]['expected_data'] = [
+      [
+        'fid' => 1,
+        'uid' => 1,
+        'filename' => 'migrate-test-file-1.pdf',
+        'filepath' => 'sites/default/files/migrate-test-file-1.pdf',
+        'filemime' => 'application/pdf',
+        'filesize' => 890404,
+        'status' => 1,
+        'timestamp' => 1382255613,
+      ],
+      [
+        'fid' => 2,
+        'uid' => 1,
+        'filename' => 'migrate-test-file-2.pdf',
+        'filepath' => 'sites/default/files/migrate-test-file-2.pdf',
+        'filemime' => 'application/pdf',
+        'filesize' => 204124,
+        'status' => 1,
+        'timestamp' => 1382255662,
+      ],
+    ];
     return $tests;
   }