You are here

public function MigrateRangeFieldTest::testFieldInstanceMigration in Range 8

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

Tests migration of D7 range instances to field_config entities.

@dataProvider fieldInstanceMigrationDataProvider

File

tests/src/Kernel/Migrate/d7/MigrateRangeFieldTest.php, line 99

Class

MigrateRangeFieldTest
Tests Drupal 7 range fields migration.

Namespace

Drupal\Tests\range\Kernel\Migrate\d7

Code

public function testFieldInstanceMigration($id, $default_value, $settings) {

  /** @var \Drupal\Core\Field\FieldConfigInterface $field */
  $field = FieldConfig::load($id);
  $this
    ->assertSame($default_value, $field
    ->getDefaultValueLiteral());
  $this
    ->assertSame($settings, $field
    ->getSettings());
}