You are here

public function FieldCollectionsFieldInstanceSettingsTest::testFieldCollectionInstanceFieldSettings in Paragraphs 8

Test settings for field_collection field instances.

@dataProvider getData

Parameters

array $source: The data source.

array $expected: The expected result.

File

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

Class

FieldCollectionsFieldInstanceSettingsTest
Test the ParagraphFieldInstanceSettings Process Plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

public function testFieldCollectionInstanceFieldSettings(array $source, array $expected) {
  $this->row
    ->expects($this
    ->any())
    ->method('getSourceProperty')
    ->willReturnMap([
    [
      'type',
      'field_collection',
    ],
    [
      'field_name',
      'field_field_collection_bundle_one',
    ],
  ]);
  $value = $this->plugin
    ->transform($source, $this->migrateExecutable, $this->row, 'settings');
  $this
    ->assertEquals($expected, $value);
}