function FieldDiscoveryTest::addAllFieldProcessesAltersData

Same name in this branch
  1. 11.x core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\FieldDiscoveryTest::addAllFieldProcessesAltersData()
Same name in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\FieldDiscoveryTest::addAllFieldProcessesAltersData()
  2. 9 core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\FieldDiscoveryTest::addAllFieldProcessesAltersData()
  3. 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\FieldDiscoveryTest::addAllFieldProcessesAltersData()
  4. 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\FieldDiscoveryTest::addAllFieldProcessesAltersData()
  5. 10 core/modules/migrate_drupal/tests/src/Kernel/d6/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d6\FieldDiscoveryTest::addAllFieldProcessesAltersData()
  6. 10 core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Kernel\d7\FieldDiscoveryTest::addAllFieldProcessesAltersData()

Provides data for testAddAllFieldProcessesAlters.

Return value

array The data.

File

core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php, line 185

Class

FieldDiscoveryTest
Test FieldDiscovery Service against Drupal 7.

Namespace

Drupal\Tests\migrate_drupal\Kernel\d7

Code

public static function addAllFieldProcessesAltersData() {
    return [
        'Field Instance' => [
            'field_plugin_method' => 'alterFieldInstanceMigration',
            'expected_process' => [
                'settings/title' => [
                    0 => [
                        'plugin' => 'static_map',
                        'source' => 'settings/title',
                        'bypass' => TRUE,
                        'map' => [
                            'disabled' => 0,
                            'optional' => 1,
                            'required' => 2,
                        ],
                    ],
                ],
            ],
        ],
        'Field Formatter' => [
            'field_plugin_method' => 'alterFieldFormatterMigration',
            'expected_process' => [
                'options/type' => [
                    0 => [
                        'map' => [
                            'taxonomy_term_reference' => [
                                'taxonomy_term_reference_link' => 'entity_reference_label',
                                'taxonomy_term_reference_plain' => 'entity_reference_label',
                                'taxonomy_term_reference_rss_category' => 'entity_reference_label',
                                'i18n_taxonomy_term_reference_link' => 'entity_reference_label',
                                'i18n_taxonomy_term_reference_plain' => 'entity_reference_label',
                                'entityreference_entity_view' => 'entity_reference_entity_view',
                            ],
                            'link_field' => [
                                'link_default' => 'link',
                                'link_title_plain' => 'link',
                                'link_host' => 'link',
                                'link_url' => 'link',
                                'link_plain' => 'link',
                                'link_absolute' => 'link',
                                'link_domain' => 'link',
                                'link_no_protocol' => 'link',
                                'link_short' => 'link',
                                'link_label' => 'link',
                                'link_separate' => 'link_separate',
                            ],
                            'entityreference' => [
                                'entityreference_label' => 'entity_reference_label',
                                'entityreference_entity_id' => 'entity_reference_entity_id',
                                'entityreference_entity_view' => 'entity_reference_entity_view',
                            ],
                            'node_reference' => [
                                'node_reference_default' => 'entity_reference_label',
                                'node_reference_plain' => 'entity_reference_label',
                                'node_reference_nid' => 'entity_reference_entity_id',
                                'node_reference_node' => 'entity_reference_entity_view',
                                'node_reference_path' => 'entity_reference_label',
                            ],
                            'user_reference' => [
                                'user_reference_default' => 'entity_reference_label',
                                'user_reference_plain' => 'entity_reference_label',
                                'user_reference_uid' => 'entity_reference_entity_id',
                                'user_reference_user' => 'entity_reference_entity_view',
                                'user_reference_path' => 'entity_reference_label',
                            ],
                            'file' => [
                                'default' => 'file_default',
                                'url_plain' => 'file_url_plain',
                                'path_plain' => 'file_url_plain',
                                'image_plain' => 'image',
                                'image_nodelink' => 'image',
                                'image_imagelink' => 'image',
                            ],
                            'datetime' => [
                                'date_default' => 'datetime_default',
                                'format_interval' => 'datetime_time_ago',
                                'date_plain' => 'datetime_plain',
                            ],
                            'email' => [
                                'email_formatter_default' => 'email_mailto',
                                'email_formatter_contact' => 'basic_string',
                                'email_formatter_plain' => 'basic_string',
                                'email_formatter_spamspan' => 'basic_string',
                                'email_default' => 'email_mailto',
                                'email_contact' => 'basic_string',
                                'email_plain' => 'basic_string',
                                'email_spamspan' => 'basic_string',
                            ],
                            'phone' => [
                                'phone' => 'basic_string',
                            ],
                            'telephone' => [
                                'text_plain' => 'string',
                                'telephone_link' => 'telephone_link',
                            ],
                        ],
                    ],
                ],
            ],
        ],
        'Field Widget' => [
            'field_plugin_method' => 'alterFieldWidgetMigration',
            'expected_process' => [
                'options/type' => [
                    'type' => [
                        'map' => [
                            'd7_text' => 'd7_text_default',
                            'number_default' => 'number_default_default',
                            'taxonomy_term_reference' => 'taxonomy_term_reference_default',
                            'image' => 'image_default',
                            'image_miw' => 'image_image',
                            'link_field' => 'link_default',
                            'entityreference' => 'entityreference_default',
                            'node_reference_select' => 'options_select',
                            'node_reference_buttons' => 'options_buttons',
                            'node_reference_autocomplete' => 'entity_reference_autocomplete_tags',
                            'user_reference_select' => 'options_select',
                            'user_reference_buttons' => 'options_buttons',
                            'user_reference_autocomplete' => 'entity_reference_autocomplete_tags',
                            'list' => 'list_default',
                            'file_mfw' => 'file_generic',
                            'filefield_widget' => 'file_generic',
                            'date' => 'datetime_default',
                            'datetime' => 'datetime_default',
                            'datestamp' => 'datetime_timestamp',
                            'email_textfield' => 'email_default',
                            'phone' => 'phone_default',
                        ],
                    ],
                ],
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.