You are here

protected function EntityReferenceTest::createTargetPluginInstance in Feeds 8.3

Creates a new target plugin instance.

Parameters

array $configuration: (optional) The configuration for the target plugin.

Return value

\Drupal\feeds\Plugin\Type\Target\TargetInterface A FeedsTarget plugin instance.

Overrides EntityReferenceTestBase::createTargetPluginInstance

3 calls to EntityReferenceTest::createTargetPluginInstance()
EntityReferenceTest::testPrepareValue in tests/src/Unit/Feeds/Target/EntityReferenceTest.php
@covers ::prepareValue @covers ::findEntities
EntityReferenceTest::testPrepareValueEmptyFeed in tests/src/Unit/Feeds/Target/EntityReferenceTest.php
@covers ::prepareValue
EntityReferenceTest::testPrepareValueReferenceNotFound in tests/src/Unit/Feeds/Target/EntityReferenceTest.php
@covers ::prepareValue @covers ::findEntities

File

tests/src/Unit/Feeds/Target/EntityReferenceTest.php, line 42

Class

EntityReferenceTest
@coversDefaultClass \Drupal\feeds\Feeds\Target\EntityReference @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Target

Code

protected function createTargetPluginInstance(array $configuration = []) {
  $configuration += [
    'feed_type' => $this
      ->createMock(FeedTypeInterface::class),
    'target_definition' => $this
      ->createTargetDefinitionMock(),
  ];
  return new EntityReference($configuration, 'entity_reference', [], $this->entityTypeManager
    ->reveal(), $this->entityFieldManager
    ->reveal(), $this->entityFinder
    ->reveal());
}