public function ParagraphsFieldSettingsTest::testTaxonomyParagraphFieldSettings

Test leaving target_type alone for other field types that may have set it.

File

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

Class

ParagraphsFieldSettingsTest
Test the ParagraphFieldSettings Process Plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

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