You are here

protected function FpmTestBase::setUp in Feeds Paragraphs 8

@inheritdoc

Overrides UnitTestCase::setUp

4 calls to FpmTestBase::setUp()
TestImporter::setUp in tests/src/Unit/TestImporter.php
@inheritdoc
TestMapper::setUp in tests/src/Unit/TestMapper.php
@inheritdoc
TestRevisionHandler::setUp in tests/src/Unit/TestRevisionHandler.php
@inheritdoc
TestWrapperTarget::setUp in tests/src/Unit/TestWrapperTarget.php
@inheritdoc
4 methods override FpmTestBase::setUp()
TestImporter::setUp in tests/src/Unit/TestImporter.php
@inheritdoc
TestMapper::setUp in tests/src/Unit/TestMapper.php
@inheritdoc
TestRevisionHandler::setUp in tests/src/Unit/TestRevisionHandler.php
@inheritdoc
TestWrapperTarget::setUp in tests/src/Unit/TestWrapperTarget.php
@inheritdoc

File

tests/src/Unit/FpmTestBase.php, line 97

Class

FpmTestBase

Namespace

Drupal\Tests\feeds_para_mapper\Unit

Code

protected function setUp() {
  $this->fieldHelper = new FieldHelper($this
    ->getTargetInfo());
  $this->fields = $this->fieldHelper->fields;
  $this->entityHelper = new EntityHelper($this->fieldHelper);
  $this->node = $this->entityHelper->node;
  $services = array(
    'feeds_para_mapper.mapper' => $this
      ->getMapperObject(),
    'entity_type.manager' => $this->entityHelper
      ->getEntityTypeManagerMock()
      ->reveal(),
    'entity_field.manager' => $this->fieldHelper
      ->getEntityFieldManagerMock(),
    'string_translation' => $this
      ->getStringTranslationStub(),
  );
  $args = func_get_args();
  if (isset($args[0])) {
    $services = array_merge($args[0], $services);
  }
  $this->services = $services;
  $this
    ->addServices($this->services);
  $this->messenger = $this
    ->getMessengerMock();
  $this
    ->initWrapper();
  parent::setUp();
}