You are here

public function RangeFieldTest::transformDataProvider in Range 8

Data provider for testTransform.

File

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

Class

RangeFieldTest
@coversDefaultClass \Drupal\range\Plugin\migrate\process\d6\RangeField @group range

Namespace

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

Code

public function transformDataProvider() {
  return [
    'single' => [
      [
        [
          'value' => 100,
        ],
      ],
      [
        [
          'from' => 100,
          'to' => 100,
        ],
      ],
    ],
    'multiple' => [
      [
        [
          'value' => -10.5,
        ],
        [
          'value' => 0,
        ],
        [
          'value' => 10.5,
        ],
        [
          'value' => 7777777,
        ],
      ],
      [
        [
          'from' => -10.5,
          'to' => -10.5,
        ],
        [
          'from' => 0,
          'to' => 0,
        ],
        [
          'from' => 10.5,
          'to' => 10.5,
        ],
        [
          'from' => 7777777,
          'to' => 7777777,
        ],
      ],
    ],
  ];
}