You are here

public function focalPointTest::resizeDataProvider in Focal Point 7

Resize Data Provider.

File

test/FocalPointTest.php, line 78

Class

focalPointTest
Class for Focal Point Test.

Code

public function resizeDataProvider() {
  return array(
    // Horizontal image with horizontal crop.
    array(
      640,
      480,
      300,
      100,
      array(
        'width' => 300,
        'height' => 225,
      ),
    ),
    // Horizontal image with vertical crop.
    array(
      640,
      480,
      100,
      300,
      array(
        'width' => 400,
        'height' => 300,
      ),
    ),
    // Vertical image with horizontal crop.
    array(
      480,
      640,
      300,
      100,
      array(
        'width' => 300,
        'height' => 400,
      ),
    ),
    // Vertical image with vertical crop.
    array(
      480,
      640,
      100,
      300,
      array(
        'width' => 225,
        'height' => 300,
      ),
    ),
    // Horizontal image with too large crop.
    array(
      640,
      480,
      3000,
      1000,
      array(
        'width' => 3000,
        'height' => 2250,
      ),
    ),
    // Image would be too small to crop after resize.
    array(
      1920,
      1080,
      400,
      300,
      array(
        'width' => 533,
        'height' => 300,
      ),
    ),
  );
}