public function FieldCollectionFieldSettingsTest::testTaxonomyParagraphFieldSettings

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

File

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

Class

FieldCollectionFieldSettingsTest
Test the FieldCollectionFieldSettings 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);
}