You are here

public function ImageUtilityTest::percentFilterProvider in Image Effects 8.3

Same name and namespace in other branches
  1. 8 tests/src/Unit/ImageUtilityTest.php \Drupal\Tests\image_effects\Unit\ImageUtilityTest::percentFilterProvider()
  2. 8.2 tests/src/Unit/ImageUtilityTest.php \Drupal\Tests\image_effects\Unit\ImageUtilityTest::percentFilterProvider()

Data provider for testPercentFilter.

File

tests/src/Unit/ImageUtilityTest.php, line 20

Class

ImageUtilityTest
Tests the image utility helper methods.

Namespace

Drupal\Tests\image_effects\Unit

Code

public function percentFilterProvider() {
  return [
    [
      50,
      400,
      50,
    ],
    [
      '50',
      400,
      50,
    ],
    [
      '50%',
      400,
      200,
    ],
    [
      50,
      NULL,
      50,
    ],
    [
      '50',
      NULL,
      50,
    ],
    [
      '50%',
      NULL,
      NULL,
    ],
    [
      NULL,
      100,
      NULL,
    ],
    [
      NULL,
      NULL,
      NULL,
    ],
    [
      '10%',
      400,
      40,
    ],
    [
      '100%',
      400,
      400,
    ],
    [
      '150%',
      400,
      600,
    ],
  ];
}