You are here

public function MigrateFieldPluginManagerTest::weightsData in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php \Drupal\Tests\migrate_drupal\Unit\MigrateFieldPluginManagerTest::weightsData()

Provides data for testWeights().

Return value

array The data.

File

core/modules/migrate_drupal/tests/src/Unit/MigrateFieldPluginManagerTest.php, line 52

Class

MigrateFieldPluginManagerTest
Tests the MigrateFieldPluginManager class.

Namespace

Drupal\Tests\migrate_drupal\Unit

Code

public function weightsData() {
  return [
    'Field 1, D6' => [
      'field_type' => 'field_1',
      'core' => 6,
      'expected_plugin_id' => 'core_replacement_plugin',
    ],
    'Field 2, D6' => [
      'field_type' => 'field_2',
      'core' => 6,
      'expected_plugin_id' => 'field_1',
    ],
    'Field 3, D6' => [
      'field_type' => 'field_3',
      'core' => 6,
      'expected_plugin_id' => 'field_3',
    ],
    'Field 4, D6' => [
      'field_type' => 'field_4',
      'core' => 6,
      'expected_plugin_id' => 'field_4',
    ],
    'Field 5, D6' => [
      'field_type' => 'field_5',
      'core' => 6,
      'expected_plugin_id' => 'alphabetically_second',
    ],
    'Field 1, D7' => [
      'field_type' => 'field_1',
      'core' => 7,
      'expected_plugin_id' => 'core_replacement_plugin',
    ],
    'Field 2, D7' => [
      'field_type' => 'field_2',
      'core' => 7,
      'expected_plugin_id' => FALSE,
    ],
    'Field 3, D7' => [
      'field_type' => 'field_3',
      'core' => 7,
      'expected_plugin_id' => 'field_3',
    ],
    'Field 4, D7' => [
      'field_type' => 'field_4',
      'core' => 7,
      'expected_plugin_id' => 'contrib_override_plugin',
    ],
    'Field 5, D7' => [
      'field_type' => 'field_5',
      'core' => 7,
      'expected_plugin_id' => 'alphabetically_first',
    ],
  ];
}