You are here

public function RangeFieldSettingsTest::transformDataProvider in Range 8

Data provider for testTransform.

File

tests/src/Unit/Plugin/migrate/process/d6/RangeFieldSettingsTest.php, line 32

Class

RangeFieldSettingsTest
@coversDefaultClass \Drupal\range\Plugin\migrate\process\d6\RangeFieldSettings @group range

Namespace

Drupal\Tests\range\Unit\Plugin\migrate\process\d6

Code

public function transformDataProvider() {
  return [
    'range_decimal: precision/scale are set' => [
      'range_decimal',
      [
        'precision' => 12,
        'scale' => 1,
      ],
      [
        'precision' => 12,
        'scale' => 1,
      ],
    ],
    'range_decimal: extra settings present' => [
      'range_decimal',
      [
        'precision' => 15,
        'scale' => 0,
        'prefix' => '',
        'suffix' => '',
        'allowed_values_php' => '',
      ],
      [
        'precision' => 15,
        'scale' => 0,
      ],
    ],
    'range_float' => [
      'range_float',
      [
        'precision' => 10,
        'scale' => 2,
        'prefix' => '',
        'suffix' => '',
        'allowed_values_php' => '',
      ],
      [],
    ],
    'range_integer' => [
      'range_integer',
      [
        'precision' => 10,
        'scale' => 2,
        'prefix' => '',
        'suffix' => '',
        'allowed_values_php' => '',
      ],
      [],
    ],
  ];
}