You are here

public function MigrateRangeFieldTest::fieldFormatterMigrationDataProvider in Range 8

Same name in this branch
  1. 8 tests/src/Kernel/Migrate/d6/MigrateRangeFieldTest.php \Drupal\Tests\range\Kernel\Migrate\d6\MigrateRangeFieldTest::fieldFormatterMigrationDataProvider()
  2. 8 tests/src/Kernel/Migrate/d7/MigrateRangeFieldTest.php \Drupal\Tests\range\Kernel\Migrate\d7\MigrateRangeFieldTest::fieldFormatterMigrationDataProvider()

Data provider for testFieldFormatterMigration.

File

tests/src/Kernel/Migrate/d6/MigrateRangeFieldTest.php, line 219

Class

MigrateRangeFieldTest
Tests Drupal 6 range fields migration.

Namespace

Drupal\Tests\range\Kernel\Migrate\d6

Code

public function fieldFormatterMigrationDataProvider() {
  return [
    // Range decimal field type.
    'unformatted range_decimal' => [
      'node.page.default',
      'field_decimal',
      'range_unformatted',
      [
        'field_prefix_suffix' => TRUE,
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    'default range_decimal' => [
      'node.page.teaser',
      'field_decimal',
      'range_decimal',
      [
        'field_prefix_suffix' => TRUE,
        'decimal_separator' => '.',
        'scale' => 2,
        'thousand_separator' => '',
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    'us_2 range_decimal' => [
      'node.page.rss',
      'field_decimal',
      'range_decimal',
      [
        'scale' => 2,
        'decimal_separator' => '.',
        'thousand_separator' => ',',
        'field_prefix_suffix' => TRUE,
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    // Range float field type.
    'unformatted range_float' => [
      'node.page.default',
      'field_float',
      'range_unformatted',
      [
        'field_prefix_suffix' => TRUE,
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    'default range_float' => [
      'node.page.teaser',
      'field_float',
      'range_decimal',
      [
        'field_prefix_suffix' => TRUE,
        'decimal_separator' => '.',
        'scale' => 2,
        'thousand_separator' => '',
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    'be_1 range_float' => [
      'node.page.rss',
      'field_float',
      'range_decimal',
      [
        'scale' => 1,
        'decimal_separator' => ',',
        'thousand_separator' => '.',
        'field_prefix_suffix' => TRUE,
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    // Range integer field type.
    'unformatted range_integer' => [
      'node.page.default',
      'field_integer',
      'range_unformatted',
      [
        'field_prefix_suffix' => TRUE,
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    'default range_integer' => [
      'node.page.teaser',
      'field_integer',
      'range_integer',
      [
        'field_prefix_suffix' => TRUE,
        'thousand_separator' => '',
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
    'fr_0 range_integer' => [
      'node.page.rss',
      'field_integer',
      'range_integer',
      [
        'thousand_separator' => ' ',
        'field_prefix_suffix' => TRUE,
        'range_separator' => '-',
        'range_combine' => TRUE,
        'from_prefix_suffix' => FALSE,
        'to_prefix_suffix' => FALSE,
        'combined_prefix_suffix' => FALSE,
      ],
    ],
  ];
}