You are here

public function FocalPointEffectsTest::transformFocalPointProvider in Focal Point 8

Data provider for testTransformFocalPoint().

See also

FocalPointEffectsTest::testTransformFocalPoint()

File

tests/src/Unit/Effects/FocalPointEffectsTest.php, line 118

Class

FocalPointEffectsTest
Tests the Focal Point image effects.

Namespace

Drupal\Tests\focal_point\Unit\Effects

Code

public function transformFocalPointProvider() {
  $data = [];

  // @codingStandardsIgnoreStart
  $data['no_scale'] = [
    [
      'width' => 800,
      'height' => 600,
    ],
    [
      'width' => 800,
      'height' => 600,
    ],
    [
      'x' => 300,
      'y' => 400,
    ],
    [
      'x' => 300,
      'y' => 400,
    ],
  ];
  $data['scaled_down'] = [
    [
      'width' => 800,
      'height' => 600,
    ],
    [
      'width' => 2500,
      'height' => 4000,
    ],
    [
      'x' => 100,
      'y' => 100,
    ],
    [
      'x' => 32,
      'y' => 15,
    ],
  ];
  $data['scaled_up'] = [
    [
      'width' => 800,
      'height' => 600,
    ],
    [
      'width' => 460,
      'height' => 313,
    ],
    [
      'x' => 500,
      'y' => 900,
    ],
    [
      'x' => 870,
      'y' => 1725,
    ],
  ];
  $data['different_orientation'] = [
    [
      'width' => 350,
      'height' => 200,
    ],
    [
      'width' => 5000,
      'height' => 4000,
    ],
    [
      'x' => 2100,
      'y' => 313,
    ],
    [
      'x' => 147,
      'y' => 16,
    ],
  ];

  // @codingStandardsIgnoreEnd
  return $data;
}