Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / file / src / Tests / FileFieldTestBase.php
index b7b90d7d378e9ef6308eaa0784c317064dc8f9e0..0f82af3eac67322d8c935f8801bb7dfbd650187d 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace Drupal\file\Tests;
 
+@trigger_error('The ' . __NAMESPACE__ . '\FileFieldTestBase is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\file\Functional\FileFieldTestBase. See https://www.drupal.org/node/2969361.', E_USER_DEPRECATED);
+
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\file\FileInterface;
@@ -251,7 +253,7 @@ abstract class FileFieldTestBase extends WebTestBase {
    */
   public function replaceNodeFile($file, $field_name, $nid, $new_revision = TRUE) {
     $edit = [
-      'files[' . $field_name . '_0]' => drupal_realpath($file->getFileUri()),
+      'files[' . $field_name . '_0]' => \Drupal::service('file_system')->realpath($file->getFileUri()),
       'revision' => (string) (int) $new_revision,
     ];