You are here

public function FieldCollectionFieldSettingsTest::testParagraphsFieldSettings in Paragraphs 8

Test setting target_type for paragraphs fields.

File

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);
}