function ImageEffectsTest::testConvertEffect
Same name in other branches
- 9 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testConvertEffect()
- 10 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testConvertEffect()
- 11.x core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testConvertEffect()
Tests the ConvertImageEffect plugin.
File
-
core/
modules/ image/ tests/ src/ Functional/ ImageEffectsTest.php, line 95
Class
- ImageEffectsTest
- Tests that the image effects pass parameters to the toolkit correctly.
Namespace
Drupal\Tests\image\FunctionalCode
public function testConvertEffect() {
// Test jpeg.
$this->assertImageEffect('image_convert', [
'extension' => 'jpeg',
]);
$this->assertToolkitOperationsCalled([
'convert',
]);
// Check the parameters.
$calls = $this->imageTestGetAllCalls();
$this->assertEqual($calls['convert'][0][0], 'jpeg', 'Extension was passed correctly');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.