public function ParagraphsFieldSettingsTest::testParagraphsFieldSettings

Test setting target_type for paragraphs fields.

File

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

Class

ParagraphsFieldSettingsTest
Test the ParagraphFieldSettings Process Plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

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