diff core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
line wrap: on
line diff
--- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php	Thu Feb 28 13:21:36 2019 +0000
+++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php	Thu May 09 15:33:08 2019 +0100
@@ -42,7 +42,7 @@
     for ($i = 1; $i <= 10; $i++) {
       $filename = $this->randomMachineName() . "$i";
       $desired_filepath = 'public://' . $filename;
-      file_unmanaged_copy($files[0]->uri, $desired_filepath, FILE_EXISTS_ERROR);
+      \Drupal::service('file_system')->copy($files[0]->uri, $desired_filepath, FILE_EXISTS_ERROR);
       $file = File::create(['uri' => $desired_filepath, 'filename' => $filename, 'name' => $filename]);
       $file->save();
     }