diff core/modules/image/tests/src/Kernel/ImageItemTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line diff
--- a/core/modules/image/tests/src/Kernel/ImageItemTest.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/modules/image/tests/src/Kernel/ImageItemTest.php	Thu May 09 15:34:47 2019 +0100
@@ -67,7 +67,7 @@
         'file_extensions' => 'jpg',
       ],
     ])->save();
-    file_unmanaged_copy($this->root . '/core/misc/druplicon.png', 'public://example.jpg');
+    \Drupal::service('file_system')->copy($this->root . '/core/misc/druplicon.png', 'public://example.jpg');
     $this->image = File::create([
       'uri' => 'public://example.jpg',
     ]);
@@ -100,7 +100,7 @@
     $this->assertEqual($entity->image_test->entity->uuid(), $this->image->uuid());
 
     // Make sure the computed entity reflects updates to the referenced file.
-    file_unmanaged_copy($this->root . '/core/misc/druplicon.png', 'public://example-2.jpg');
+    \Drupal::service('file_system')->copy($this->root . '/core/misc/druplicon.png', 'public://example-2.jpg');
     $image2 = File::create([
       'uri' => 'public://example-2.jpg',
     ]);