public function ImageEffectsTest::testConvertEffect in Drupal 8
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');
}