Commit a3bbaae2 authored by catch's avatar catch

Issue #2618830 by webflo, jan.stoeckler: Term widget migration should depend on tags property

parent 7da92b57
......@@ -34054,7 +34054,7 @@
'hierarchy' => '1',
'multiple' => '1',
'required' => '0',
'tags' => '0',
'tags' => '1',
'module' => 'taxonomy',
'weight' => '5',
))
......
......@@ -8,12 +8,17 @@ source:
entity_type: node
form_mode: default
options:
type: options_select
weight: 20
process:
entity_type: 'constants/entity_type'
form_mode: 'constants/form_mode'
options: 'constants/options'
options/type:
plugin: static_map
source: tags
map:
0: options_select
1: entity_reference_autocomplete_tags
options/weight: 'constants/options/weight'
bundle: type
field_name:
plugin: migration
......
......@@ -41,6 +41,11 @@ public function testVocabularyEntityFormDisplay() {
$this->assertIdentical(20, $component['weight']);
// Test the Id map.
$this->assertIdentical(array('node', 'article', 'default', 'tags'), Migration::load('d6_vocabulary_entity_form_display')->getIdMap()->lookupDestinationID(array(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');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment