public function FieldCollectionFieldSettingsTest::testParagraphsFieldSettings

Test setting target_type for paragraphs fields.

File

paragraphs/tests/src/Unit/migrate/FieldCollectionFieldSettingsTest.php, line 28

Class

FieldCollectionFieldSettingsTest
Test the FieldCollectionFieldSettings Process Plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

public function testParagraphsFieldSettings() {
  $this->row
    ->expects($this
    ->any())
    ->method('getSourceProperty')
    ->with('type')
    ->willReturn('field_collection');
  $value = $this->plugin
    ->transform([], $this->migrateExecutable, $this->row, 'settings');
  $this
    ->assertEquals([
    'target_type' => 'paragraph',
  ], $value);
}