function ImageEffectsTest::testResizeEffect in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/image/src/Tests/ImageEffectsTest.php \Drupal\image\Tests\ImageEffectsTest::testResizeEffect()
Test the image_resize_effect() function.
File
- core/
modules/ image/ src/ Tests/ ImageEffectsTest.php, line 41 - Contains \Drupal\image\Tests\ImageEffectsTest.
Class
- ImageEffectsTest
- Tests that the image effects pass parameters to the toolkit correctly.
Namespace
Drupal\image\TestsCode
function testResizeEffect() {
$this
->assertImageEffect('image_resize', array(
'width' => 1,
'height' => 2,
));
$this
->assertToolkitOperationsCalled(array(
'resize',
));
// Check the parameters.
$calls = $this
->imageTestGetAllCalls();
$this
->assertEqual($calls['resize'][0][0], 1, 'Width was passed correctly');
$this
->assertEqual($calls['resize'][0][1], 2, 'Height was passed correctly');
}