You are here

public function MigrateRangeFieldTest::testFieldMigration in Range 8

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

Tests migration of D7 range fields to field_storage_config entities.

@dataProvider fieldMigrationDataProvider

File

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

Class

MigrateRangeFieldTest
Tests Drupal 7 range fields migration.

Namespace

Drupal\Tests\range\Kernel\Migrate\d7

Code

public function testFieldMigration($id, $type, $settings) {

  /** @var \Drupal\field\FieldStorageConfigInterface $field */
  $field = FieldStorageConfig::load($id);
  $this
    ->assertInstanceOf(FieldStorageConfigInterface::class, $field);
  $this
    ->assertSame($type, $field
    ->getType());
  $this
    ->assertSame($settings, $field
    ->getSettings());
}