function ImageEffectsTest::testResizeEffect
Same name in other branches
- 9 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testResizeEffect()
- 10 core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testResizeEffect()
- 11.x core/modules/image/tests/src/Kernel/ImageEffectsTest.php \Drupal\Tests\image\Kernel\ImageEffectsTest::testResizeEffect()
Test the image_resize_effect() function.
File
-
core/
modules/ image/ tests/ src/ Functional/ ImageEffectsTest.php, line 42
Class
- ImageEffectsTest
- Tests that the image effects pass parameters to the toolkit correctly.
Namespace
Drupal\Tests\image\FunctionalCode
public function testResizeEffect() {
$this->assertImageEffect('image_resize', [
'width' => 1,
'height' => 2,
]);
$this->assertToolkitOperationsCalled([
'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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.