public function MigrateFieldInstanceTest::testFieldInstances in Inline Entity Form 8
Tests migrating D7 field instances to field_config entities.
File
- tests/
src/ Kernel/ Migrate/ MigrateFieldInstanceTest.php, line 91
Class
- MigrateFieldInstanceTest
- Tests migration of inline_entity_form field instances.
Namespace
Drupal\Tests\inline_entity_form\Kernel\MigrateCode
public function testFieldInstances() {
$this
->assertEntity('node.test.body', 'Body', 'text_with_summary', FALSE, FALSE);
$this
->assertEntity('node.test.field_single', 'single', 'entity_reference', FALSE, FALSE);
$this
->assertEntity('node.test.field_multiple', 'multiple', 'entity_reference', FALSE, FALSE);
$this
->assertEntityReferenceFields('node.test.field_single', [
'page',
], [
'field' => 'language',
'direction' => 'DESC',
]);
$this
->assertEntityReferenceFields('node.test.field_multiple', [
'page',
'test',
], [
'field' => '_none',
'direction' => 'ASC',
]);
}