public function FocalPointEffectsTest::calculateResizeDataProvider in Focal Point 8
Data provider for testCalculateResizeData().
See also
FocalPointEffectsTest::testCalculateResizeData()
File
- tests/
src/ Unit/ Effects/ FocalPointEffectsTest.php, line 64
Class
- FocalPointEffectsTest
- Tests the Focal Point image effects.
Namespace
Drupal\Tests\focal_point\Unit\EffectsCode
public function calculateResizeDataProvider() {
$data = [];
// @codingStandardsIgnoreStart
$data['horizontal_image_horizontal_crop'] = [
640,
480,
300,
100,
[
'width' => 300,
'height' => 225,
],
];
$data['horizontal_image_vertical_crop'] = [
640,
480,
100,
300,
[
'width' => 400,
'height' => 300,
],
];
$data['vertical_image_horizontal_crop'] = [
480,
640,
300,
100,
[
'width' => 300,
'height' => 400,
],
];
$data['vertical_image_vertical_crop'] = [
480,
640,
100,
300,
[
'width' => 225,
'height' => 300,
],
];
$data['horizontal_image_too_large_crop'] = [
640,
480,
3000,
1000,
[
'width' => 3000,
'height' => 2250,
],
];
$data['image_too_narrow_to_crop_after_resize'] = [
1920,
1080,
400,
300,
[
'width' => 534,
'height' => 300,
],
];
$data['image_too_short_to_crop_after_resize'] = [
200,
400,
1000,
1000,
[
'width' => 1000,
'height' => 2000,
],
];
// @codingStandardsIgnoreEnd
return $data;
}