function ImageTest::testResize
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testResize()
- 8.9.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testResize()
- 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testResize()
Tests \Drupal\Core\Image\Image::resize().
File
-
core/
tests/ Drupal/ Tests/ Core/ Image/ ImageTest.php, line 432
Class
- ImageTest
- Tests the image class.
Namespace
Drupal\Tests\Core\ImageCode
public function testResize() : void {
$this->getTestImageForOperation('Resize');
$this->toolkitOperation
->expects($this->once())
->method('execute')
->willReturnArgument(0);
// Resize with integer for width and height.
$ret = $this->image
->resize(30, 40);
$this->assertEquals(30, $ret['width']);
$this->assertEquals(40, $ret['height']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.