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