You are here

protected function MediaEntityReferenceTest::getMediaEntityReferenceTestFiles in Entity Share 8.2

Helper function.

Parameters

string $file_uuid: The file UUID.

array $file_data: The file data as in static::filesData.

File

modules/entity_share_client/tests/src/Functional/MediaEntityReferenceTest.php, line 279

Class

MediaEntityReferenceTest
Functional test class for media entity reference field.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function getMediaEntityReferenceTestFiles($file_uuid, array $file_data) {

  /** @var \Drupal\Core\File\FileSystemInterface $file_system */
  $file_system = \Drupal::service('file_system');
  $filepath = drupal_get_path('module', 'entity_share') . '/tests/fixtures/files/' . $file_data['filename'];
  $file_system
    ->copy($filepath, PublicStream::basePath());
  $this->filesSize[$file_uuid] = filesize($filepath);
}