function FieldDiscoveryTest::getFieldInstanceStubMigrationDefinition

Same name in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Unit\FieldDiscoveryTest::getFieldInstanceStubMigrationDefinition()
  2. 8.9.x core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Unit\FieldDiscoveryTest::getFieldInstanceStubMigrationDefinition()
  3. 10 core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Unit\FieldDiscoveryTest::getFieldInstanceStubMigrationDefinition()

Provides data for testGetFieldInstanceStubMigrationDefinition.

Return value

array The data.

File

core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php, line 334

Class

FieldDiscoveryTest
Tests the FieldDiscovery Class.

Namespace

Drupal\Tests\migrate_drupal\Unit

Code

public static function getFieldInstanceStubMigrationDefinition() {
    return [
        'Drupal 6' => [
            'core' => FieldDiscoveryInterface::DRUPAL_6,
            'expected_definition' => [
                'destination' => [
                    'plugin' => 'null',
                ],
                'idMap' => [
                    'plugin' => 'null',
                ],
                'source' => [
                    'ignore_map' => TRUE,
                    'plugin' => 'd6_field_instance',
                ],
            ],
        ],
        'Drupal 7' => [
            'core' => FieldDiscoveryInterface::DRUPAL_7,
            'expected_definition' => [
                'destination' => [
                    'plugin' => 'null',
                ],
                'idMap' => [
                    'plugin' => 'null',
                ],
                'source' => [
                    'ignore_map' => TRUE,
                    'plugin' => 'd7_field_instance',
                ],
            ],
        ],
    ];
}

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