public function ImageUtilityTest::percentFilterProvider in Image Effects 8
Same name and namespace in other branches
- 8.3 tests/src/Unit/ImageUtilityTest.php \Drupal\Tests\image_effects\Unit\ImageUtilityTest::percentFilterProvider()
 - 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\UnitCode
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,
    ],
  ];
}