You are here

public function MigrateFieldTest::testFields in Inline Entity Form 8

Tests migrating D7 fields to field_storage_config entities.

File

tests/src/Kernel/Migrate/MigrateFieldTest.php, line 66

Class

MigrateFieldTest
Tests migration of inline_entity_form fields.

Namespace

Drupal\Tests\inline_entity_form\Kernel\Migrate

Code

public function testFields() {
  $this
    ->assertEntity('node.body', 'text_with_summary', TRUE, 1);
  $this
    ->assertEntity('node.field_single', 'entity_reference', TRUE, 1);
  $this
    ->assertEntity('node.field_multiple', 'entity_reference', TRUE, 1);
  $field = FieldStorageConfig::load('node.field_single');
  $this
    ->assertEquals('node', $field
    ->getSetting('target_type'));
  $field = FieldStorageConfig::load('node.field_multiple');
  $this
    ->assertEquals('node', $field
    ->getSetting('target_type'));
}