public function ImageEffectsTest::testConvertEffect in Drupal 9
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\KernelCode
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]);
}