You are here

protected function S3FileOriginLocatorTest::createImageStyle in Acquia Content Hub 8.2

Creates and returns a new image style.

Return value

\Drupal\image\ImageStyleInterface The image style object saved into database.

Throws

\Drupal\Core\Entity\EntityStorageException

1 call to S3FileOriginLocatorTest::createImageStyle()
S3FileOriginLocatorTest::runTestWith in modules/acquia_contenthub_s3/tests/src/Kernel/S3FileOriginLocatorTest.php
Run tests with the specified paramteres.

File

modules/acquia_contenthub_s3/tests/src/Kernel/S3FileOriginLocatorTest.php, line 224

Class

S3FileOriginLocatorTest
Tests the S3FileOriginLocator.

Namespace

Drupal\Tests\acquia_contenthub_s3\Kernel

Code

protected function createImageStyle() : ImageStyleInterface {

  /** @var \Drupal\image\ImageStyleInterface $style */
  $style = ImageStyle::create([
    'name' => 'test',
  ]);
  $style
    ->save();
  return $style;
}