public function RangeFieldTest::testAlterFieldMigration in Range 8
@covers ::alterFieldMigration @dataProvider alterMigrationDataProvider
File
- tests/
src/ Unit/ Plugin/ migrate/ field/ d6/ RangeFieldTest.php, line 82
Class
- RangeFieldTest
- @coversDefaultClass \Drupal\range\Plugin\migrate\field\d6\RangeField @group range
Namespace
Drupal\Tests\range\Unit\Plugin\migrate\field\d6Code
public function testAlterFieldMigration($field_type, $is_range_field_type) {
$this->row
->expects(self::once())
->method('getSourceProperty')
->willReturn($field_type);
$this->plugin
->alterFieldMigration($this->migration);
$process = $this->migration
->getProcess();
if ($is_range_field_type) {
$this
->assertSame([
'range_decimal' => [
'range' => 'range_decimal',
],
'range_float' => [
'range' => 'range_float',
],
'range_integer' => [
'range' => 'range_integer',
],
], $process['type'][0]['map']);
$expected_process = [
'plugin' => 'd6_range_field_settings',
];
$this
->assertSame([
$expected_process,
], $process['settings']);
}
else {
$this
->assertSame([], $process);
}
}