function ImageEffectsTest::testConvertEffect

Same name in other branches
  1. 8.9.x core/modules/image/tests/src/Functional/ImageEffectsTest.php \Drupal\Tests\image\Functional\ImageEffectsTest::testConvertEffect()
  2. 10 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testConvertEffect()
  3. 11.x 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 108

Class

ImageEffectsTest
Tests image effects.

Namespace

Drupal\Tests\image\Kernel

Code

public function testConvertEffect() {
    // 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.