You are here

protected function TestImporter::initImporter in Feeds Paragraphs 8

1 call to TestImporter::initImporter()
TestImporter::setUp in tests/src/Unit/TestImporter.php
@inheritdoc

File

tests/src/Unit/TestImporter.php, line 60

Class

TestImporter
@group Feeds Paragraphs @coversDefaultClass \Drupal\feeds_para_mapper\Importer

Namespace

Drupal\Tests\feeds_para_mapper\Unit

Code

protected function initImporter() {
  $propsValues = array(
    'feed' => $this
      ->getFeedMock(),
    'entity' => $this->node
      ->reveal(),
    'target' => $this->field,
    'configuration' => array(
      'max_values' => 1,
    ),
    'values' => array(
      array(
        'value' => "Test value",
      ),
    ),
    'targetInfo' => $this->field
      ->get('target_info'),
    'instance' => $this->wrapperTarget
      ->createTargetInstance(),
  );
  foreach ($propsValues as $prop => $value) {
    $this
      ->updateProperty(Importer::class, $this->importer, $prop, $value);
  }
}