public function ImageTest::testCrop in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testCrop()
- 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testCrop()
Tests \Drupal\Core\Image\Image::crop().
File
- core/
tests/ Drupal/ Tests/ Core/ Image/ ImageTest.php, line 402
Class
- ImageTest
- Tests the image class.
Namespace
Drupal\Tests\Core\ImageCode
public function testCrop() {
$this
->getTestImageForOperation('Crop');
$this->toolkitOperation
->expects($this
->once())
->method('execute')
->will($this
->returnArgument(0));
$ret = $this->image
->crop(0, 0, 44, 50);
$this
->assertEquals(44, $ret['width']);
}