// Attempt to upload a non-tar file.
$text_file = $this->getTestFiles('text')[0];
- $edit = ['files[import_tarball]' => drupal_realpath($text_file->uri)];
+ $edit = ['files[import_tarball]' => \Drupal::service('file_system')->realpath($text_file->uri)];
$this->drupalPostForm('admin/config/development/configuration/full/import', $edit, t('Upload'));
$this->assertText(t('Could not extract the contents of the tar file'));