Mercurial > hg > cmmr2012-drupal-site
diff core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.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/ImageThemeFunctionTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php Thu May 09 15:34:47 2019 +0100 @@ -3,6 +3,7 @@ namespace Drupal\Tests\image\Kernel; use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Url; use Drupal\entity_test\Entity\EntityTest; use Drupal\field\Entity\FieldConfig; @@ -62,7 +63,7 @@ 'field_name' => 'image_test', 'bundle' => 'entity_test', ])->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', ]); @@ -80,7 +81,7 @@ // Create an image. $files = $this->drupalGetTestFiles('image'); $file = reset($files); - $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME); + $original_uri = \Drupal::service('file_system')->copy($file->uri, 'public://', FileSystemInterface::EXISTS_RENAME); // Create a style. $style = ImageStyle::create(['name' => 'test', 'label' => 'Test']); @@ -142,7 +143,7 @@ // Create an image. $files = $this->drupalGetTestFiles('image'); $file = reset($files); - $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME); + $original_uri = \Drupal::service('file_system')->copy($file->uri, 'public://', FileSystemInterface::EXISTS_RENAME); // Create a style. $style = ImageStyle::create(['name' => 'image_test', 'label' => 'Test']);