function ImageTest::testScaleAndCropWidth
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testScaleAndCropWidth()
- 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testScaleAndCropWidth()
- 11.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testScaleAndCropWidth()
Tests \Drupal\Core\Image\Image::scaleAndCrop().
File
-
core/
tests/ Drupal/ Tests/ Core/ Image/ ImageTest.php, line 334
Class
- ImageTest
- Tests the image class.
Namespace
Drupal\Tests\Core\ImageCode
public function testScaleAndCropWidth() {
$this->getTestImageForOperation('ScaleAndCrop');
$this->toolkitOperation
->expects($this->once())
->method('execute')
->will($this->returnArgument(0));
$ret = $this->image
->scaleAndCrop(34, 50, FALSE);
$this->assertEquals(5, $ret['x']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.