$this->executeMigration('d6_vocabulary_entity_form_display');
// Test that the field exists.
- $component = EntityFormDisplay::load('node.page.default')->getComponent('tags');
- $this->assertIdentical('options_select', $component['type']);
- $this->assertIdentical(20, $component['weight']);
+ $component = EntityFormDisplay::load('node.page.default')->getComponent('field_tags');
+ $this->assertSame('options_select', $component['type']);
+ $this->assertSame(20, $component['weight']);
// Test the Id map.
- $this->assertIdentical(['node', 'article', 'default', 'tags'], $this->getMigration('d6_vocabulary_entity_form_display')->getIdMap()->lookupDestinationID([4, 'article']));
+ $this->assertSame(['node', 'article', 'default', 'field_tags'], $this->getMigration('d6_vocabulary_entity_form_display')->getIdMap()->lookupDestinationID([4, 'article']));
// Test the term widget tags setting.
$entity_form_display = EntityFormDisplay::load('node.story.default');
- $this->assertIdentical($entity_form_display->getComponent('vocabulary_1_i_0_')['type'], 'options_select');
- $this->assertIdentical($entity_form_display->getComponent('vocabulary_2_i_1_')['type'], 'entity_reference_autocomplete_tags');
+ $this->assertSame($entity_form_display->getComponent('field_vocabulary_1_i_0_')['type'], 'options_select');
+ $this->assertSame($entity_form_display->getComponent('field_vocabulary_2_i_1_')['type'], 'entity_reference_autocomplete_tags');
+
+ // Tests that a vocabulary named like a D8 base field will be migrated and
+ // prefixed with 'field_' to avoid conflicts.
+ $field_type = EntityFormDisplay::load('node.sponsor.default')->getComponent('field_type');
+ $this->assertTrue(is_array($field_type));
}
/**