You are here

protected function ImageStyleQualityTest::setUp in Image Style Quality 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/ImageStyleQualityTest.php, line 43

Class

ImageStyleQualityTest
Test the image styles.

Namespace

Drupal\Tests\image_style_quality\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('image_style');
  $this
    ->installConfig('system');
  $style = ImageStyle::create([
    'name' => $this->styleName,
  ]);
  $style
    ->addImageEffect([
    'id' => 'image_style_quality',
    'data' => [
      'quality' => $this->testQuality,
    ],
  ]);
  $style
    ->save();
}