You are here

protected function AnimatedGifFieldTest::uploadImage in Animated GIF 8

Helper method to upload $file on the node.

Parameters

\Drupal\file\FileInterface $file: The file.

1 call to AnimatedGifFieldTest::uploadImage()
AnimatedGifFieldTest::gifAnimationTest in tests/src/Functional/AnimatedGifFieldTest.php
Helper method to test the image styles modifications.

File

tests/src/Functional/AnimatedGifFieldTest.php, line 124

Class

AnimatedGifFieldTest
Tests fields styles.

Namespace

Drupal\Tests\animated_gif\Functional

Code

protected function uploadImage(FileInterface $file) : void {
  $edit = [
    'files[' . $this->fieldName . '_0]' => $this->fileSystem
      ->realpath($file
      ->getFileUri()),
  ];
  $this
    ->submitForm($edit, 'Upload');
}