You are here

public function FieldCollectionsFieldInstanceSettingsTest::getData in Paragraphs 8

Data provider for unit test.

Return value

array The source data and expected data.

File

tests/src/Unit/migrate/FieldCollectionsFieldInstanceSettingsTest.php, line 70

Class

FieldCollectionsFieldInstanceSettingsTest
Test the ParagraphFieldInstanceSettings Process Plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

public function getData() {
  $data = [
    'With no data' => [
      'source_data' => [],
      'expected_results' => [
        'handler_settings' => [
          'negate' => 0,
          'target_bundles' => [
            'field_collection_bundle_one' => 'field_collection_bundle_one',
          ],
          'target_bundles_drag_drop' => [
            'field_collection_bundle_one' => [
              'enabled' => TRUE,
              'weight' => 1,
            ],
            'paragraph_bundle_one' => [
              'enabled' => FALSE,
              'weight' => 2,
            ],
            'paragraph_bundle_two' => [
              'enabled' => FALSE,
              'weight' => 3,
            ],
            'field_collection_bundle_two' => [
              'enabled' => FALSE,
              'weight' => 4,
            ],
            'prexisting_bundle_one' => [
              'enabled' => FALSE,
              'weight' => 5,
            ],
            'prexisting_bundle_two' => [
              'enabled' => FALSE,
              'weight' => 6,
            ],
          ],
        ],
      ],
    ],
  ];
  return $data;
}