You are here

protected function ImageFieldValidateTest::getFieldSettings in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/image/tests/src/Functional/ImageFieldValidateTest.php \Drupal\Tests\image\Functional\ImageFieldValidateTest::getFieldSettings()

Returns field settings.

Parameters

int[] $min_resolution: The minimum width and height resolution setting.

int[] $max_resolution: The maximum width and height resolution setting.

Return value

array

1 call to ImageFieldValidateTest::getFieldSettings()
ImageFieldValidateTest::testResolution in core/modules/image/tests/src/Functional/ImageFieldValidateTest.php
Test min/max resolution settings.

File

core/modules/image/tests/src/Functional/ImageFieldValidateTest.php, line 278

Class

ImageFieldValidateTest
Tests validation functions such as min/max resolution.

Namespace

Drupal\Tests\image\Functional

Code

protected function getFieldSettings($min_resolution, $max_resolution) {
  return [
    'max_resolution' => $max_resolution['width'] . 'x' . $max_resolution['height'],
    'min_resolution' => $min_resolution['width'] . 'x' . $min_resolution['height'],
    'alt_field' => 0,
  ];
}