You are here

public function TestWrapperTarget::testTargets in Feeds Paragraphs 8

@covers \Drupal\feeds_para_mapper\Feeds\Target\WrapperTarget::targets

File

tests/src/Unit/TestWrapperTarget.php, line 116

Class

TestWrapperTarget
@group Feeds Paragraphs @coversDefaultClass \Drupal\feeds_para_mapper\Feeds\Target\WrapperTarget

Namespace

Drupal\Tests\feeds_para_mapper\Unit

Code

public function testTargets() {
  $targets = array();
  $this->wrapperTarget
    ->targets($targets, $this->feedType, array());
  $this
    ->assertTrue(isset($targets['bundle_two_text']), 'Target added');
  $field_type = $targets['bundle_two_text']
    ->getFieldDefinition()->field_type;
  $this
    ->assertSame('entity_reference_revisions', $field_type, 'target field type is changed');
}