protected function FocalPointUnitTestCase::getTestImage in Focal Point 8
Get the test image.
Parameters
int $width: Width.
int $height: Height.
Return value
object The image.
6 calls to FocalPointUnitTestCase::getTestImage()
- FocalPointEffectsTest::testCalculateAnchor in tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php - Test calculating the anchor.
- FocalPointEffectsTest::testConstrainCropArea in tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php - Test constrain logic.
- FocalPointEffectsTest::testGetOriginalFocalPoint in tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php - Test getting the original focal point.
- FocalPointEffectsTest::testSetGetOriginalImageSize in tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php - Test the getting and setting of the original image size.
- FocalPointEffectsTest::testTransformFocalPoint in tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php - Test the focal point transformation.
File
- tests/
src/ Unit/ FocalPointUnitTestCase.php, line 95
Class
- FocalPointUnitTestCase
- Focal point unit test case.
Namespace
Drupal\Tests\focal_point\UnitCode
protected function getTestImage($width, $height) {
$image = $this
->prophesize(ImageInterface::class);
$image
->getWidth()
->willReturn($width);
$image
->getHeight()
->willReturn($height);
return $image
->reveal();
}