You are here

public function ParagraphsFieldSettingsTest::testNonParagraphFieldSettings in Paragraphs 8

Test leaving target_type empty for non-paragraphs fields.

File

tests/src/Unit/migrate/ParagraphsFieldSettingsTest.php, line 40

Class

ParagraphsFieldSettingsTest
Test the ParagraphFieldSettings Process Plugin.

Namespace

Drupal\Tests\paragraphs\Unit\migrate

Code

public function testNonParagraphFieldSettings() {
  $this->row
    ->expects($this
    ->any())
    ->method('getSourceProperty')
    ->with('type')
    ->willReturn('something_else');
  $value = $this->plugin
    ->transform([], $this->migrateExecutable, $this->row, 'settings');
  $this
    ->assertEmpty($value);
}