Commit 96a368c6 authored by alexpott's avatar alexpott

Issue #2924570 by maxocub, Rajesh Kairamkonda, heddn: Missing mappings for...

Issue #2924570 by maxocub, Rajesh Kairamkonda, heddn: Missing mappings for "nodereference_buttons" & "nodereference_autocomplete" widgets
parent 43645ea9
......@@ -57,6 +57,8 @@ process:
optionwidgets_buttons: options_buttons
optionwidgets_select: options_select
nodereference_select: options_select
nodereference_buttons: options_buttons
nodereference_autocomplete: entity_reference_autocomplete_tags
userreference_select: options_select
'options/settings':
-
......
......@@ -107,6 +107,16 @@ public function testWidgetSettings() {
$this->assertInternalType('array', $component);
$this->assertSame('options_select', $component['type']);
$component = entity_get_form_display('node', 'employee', 'default')
->getComponent('field_company_2');
$this->assertInternalType('array', $component);
$this->assertSame('options_buttons', $component['type']);
$component = entity_get_form_display('node', 'employee', 'default')
->getComponent('field_company_3');
$this->assertInternalType('array', $component);
$this->assertSame('entity_reference_autocomplete_tags', $component['type']);
$component = entity_get_form_display('node', 'employee', 'default')
->getComponent('field_commander');
$this->assertInternalType('array', $component);
......
......@@ -2716,6 +2716,30 @@
'active' => '1',
'locked' => '0',
))
->values(array(
'field_name' => 'field_company_2',
'type' => 'nodereference',
'global_settings' => 'a:1:{s:19:"referenceable_types";a:10:{s:7:"company";s:7:"company";s:7:"article";i:0;s:8:"employee";i:0;s:5:"forum";i:0;s:10:"test_event";i:0;s:9:"test_page";i:0;s:11:"test_planet";i:0;s:10:"test_story";i:0;s:7:"sponsor";i:0;s:5:"story";i:0;}}',
'required' => '0',
'multiple' => '0',
'db_storage' => '1',
'module' => 'nodereference',
'db_columns' => 'a:1:{s:3:"nid";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:0;s:5:"index";b:1;}}',
'active' => '1',
'locked' => '0',
))
->values(array(
'field_name' => 'field_company_3',
'type' => 'nodereference',
'global_settings' => 'a:1:{s:19:"referenceable_types";a:10:{s:7:"company";s:7:"company";s:7:"article";i:0;s:8:"employee";i:0;s:5:"forum";i:0;s:10:"test_event";i:0;s:9:"test_page";i:0;s:11:"test_planet";i:0;s:10:"test_story";i:0;s:7:"sponsor";i:0;s:5:"story";i:0;}}',
'required' => '0',
'multiple' => '0',
'db_storage' => '1',
'module' => 'nodereference',
'db_columns' => 'a:1:{s:3:"nid";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:0;s:5:"index";b:1;}}',
'active' => '1',
'locked' => '0',
))
->values(array(
'field_name' => 'field_multivalue',
'type' => 'number_decimal',
......@@ -3074,6 +3098,30 @@
'widget_module' => 'nodereference',
'widget_active' => '1',
))
->values(array(
'field_name' => 'field_company_2',
'type_name' => 'employee',
'weight' => '33',
'label' => 'Company 2',
'widget_type' => 'nodereference_buttons',
'widget_settings' => 'a:4:{s:18:"autocomplete_match";s:8:"contains";s:4:"size";i:60;s:13:"default_value";a:1:{i:0;a:1:{s:3:"nid";s:0:"";}}s:17:"default_value_php";N;}',
'display_settings' => 'a:5:{s:5:"label";a:2:{s:6:"format";s:5:"above";s:7:"exclude";i:0;}i:5;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:6:"teaser";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:4:"full";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}i:4;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}}',
'description' => '',
'widget_module' => 'nodereference',
'widget_active' => '1',
))
->values(array(
'field_name' => 'field_company_3',
'type_name' => 'employee',
'weight' => '34',
'label' => 'Company 3',
'widget_type' => 'nodereference_autocomplete',
'widget_settings' => 'a:4:{s:18:"autocomplete_match";s:8:"contains";s:4:"size";s:2:"60";s:13:"default_value";a:1:{i:0;a:2:{s:3:"nid";N;s:14:"_error_element";s:50:"default_value_widget][field_company_3][0][nid][nid";}}s:17:"default_value_php";N;}',
'display_settings' => 'a:5:{s:5:"label";a:2:{s:6:"format";s:5:"above";s:7:"exclude";i:0;}i:5;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:6:"teaser";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}s:4:"full";a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}i:4;a:2:{s:6:"format";s:7:"default";s:7:"exclude";i:0;}}',
'description' => '',
'widget_module' => 'nodereference',
'widget_active' => '1',
))
->values(array(
'field_name' => 'field_multivalue',
'type_name' => 'test_planet',
......@@ -3374,6 +3422,18 @@
'size' => 'normal',
'unsigned' => TRUE,
),
'field_company_2_nid' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_company_3_nid' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
),
'primary key' => array(
'vid',
......@@ -3385,6 +3445,12 @@
'field_commander_uid' => array(
'field_commander_uid',
),
'field_company_2_nid' => array(
'field_company_2_nid',
),
'field_company_3_nid' => array(
'field_company_3_nid',
),
),
'mysql_character_set' => 'utf8',
));
......@@ -3394,11 +3460,15 @@
'vid',
'nid',
'field_commander_uid',
'field_company_2_nid',
'field_company_3_nid',
))
->values(array(
'vid' => '21',
'nid' => '18',
'field_commander_uid' => '8',
'field_company_2_nid' => '15',
'field_company_3_nid' => '16',
))
->execute();
......@@ -63,8 +63,8 @@ protected function getEntityCounts() {
'contact_form' => 5,
'configurable_language' => 5,
'editor' => 2,
'field_config' => 84,
'field_storage_config' => 58,
'field_config' => 86,
'field_storage_config' => 60,
'file' => 8,
'filter_format' => 7,
'image_style' => 5,
......
......@@ -94,6 +94,10 @@ public function testNode() {
$this->assertCount(2, $node->field_company);
$this->assertSame('Klingon Empire', $node->field_company[0]->entity->label());
$this->assertSame('Romulan Empire', $node->field_company[1]->entity->label());
$this->assertCount(1, $node->field_company_2);
$this->assertSame('Klingon Empire', $node->field_company_2[0]->entity->label());
$this->assertCount(1, $node->field_company_3);
$this->assertSame('Romulan Empire', $node->field_company_3[0]->entity->label());
// Test that user reference field values were migrated.
$this->assertCount(1, $node->field_commander);
......
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