You are here

protected function RangeTestTrait::getFieldStorageSettings in Range 8

Returns test range field storage settings.

Parameters

string $field_type: Range field type. Could be one of the following values: range_integer, range_float or range_decimal.

Return value

array Range field storage settings.

1 call to RangeTestTrait::getFieldStorageSettings()
RangeTestTrait::createField in tests/src/Traits/RangeTestTrait.php
Creates a range field of a given type.

File

tests/src/Traits/RangeTestTrait.php, line 93

Class

RangeTestTrait
Provides helper methods to test range fields.

Namespace

Drupal\Tests\range\Traits

Code

protected function getFieldStorageSettings($field_type = 'range_integer') {
  switch ($field_type) {
    case 'range_integer':
    case 'range_float':
      return [];
    case 'range_decimal':
      return [
        'precision' => 12,
        'scale' => 4,
      ];
  }
}