You are here

protected function ConfigEntityReferenceTest::createReferencableEntityType in Feeds 8.3

Creates a referencable entity type instance.

Return value

\Drupal\Core\Entity\EntityTypeInterface The entity type to use in tests.

Overrides EntityReferenceTestBase::createReferencableEntityType

File

tests/src/Unit/Feeds/Target/ConfigEntityReferenceTest.php, line 48

Class

ConfigEntityReferenceTest
@coversDefaultClass \Drupal\feeds\Feeds\Target\ConfigEntityReference @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Target

Code

protected function createReferencableEntityType() {
  $referenceable_entity_type = $this
    ->prophesize(ConfigEntityTypeInterface::class);
  $referenceable_entity_type
    ->entityClassImplements(ConfigEntityInterface::class)
    ->willReturn(TRUE)
    ->shouldBeCalled();
  $referenceable_entity_type
    ->getKey('label')
    ->willReturn('label');
  $referenceable_entity_type
    ->getConfigPrefix()
    ->willReturn('foo.foo');
  return $referenceable_entity_type;
}