function ImageEffectsTest::testConvertEffect

Same name in other branches
  1. 9 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testConvertEffect()
  2. 8.9.x core/modules/image/tests/src/Functional/ImageEffectsTest.php \Drupal\Tests\image\Functional\ImageEffectsTest::testConvertEffect()
  3. 10 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testConvertEffect()

Tests the 'image_convert' effect.

File

core/modules/image/tests/src/Kernel/ImageEffectsTest.php, line 110

Class

ImageEffectsTest
Tests image effects.

Namespace

Drupal\Tests\image\Kernel

Code

public function testConvertEffect() : void {
    // Test jpeg.
    $this->assertImageEffect([
        'convert',
    ], 'image_convert', [
        'extension' => 'jpeg',
    ]);
    // Check the parameters.
    $calls = $this->imageTestGetAllCalls();
    // Extension was passed correctly.
    $this->assertEquals('jpeg', $calls['convert'][0][0]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.