You are here

private function UnitTestBase::getEntityTypeRepositoryMock in Entity Construction Kit (ECK) 8

Retrieves the entity type repository mock.

1 call to UnitTestBase::getEntityTypeRepositoryMock()
UnitTestBase::setUp in tests/src/Unit/UnitTestBase.php

File

tests/src/Unit/UnitTestBase.php, line 112

Class

UnitTestBase
Base class for unit tests.

Namespace

Drupal\Tests\eck\Unit

Code

private function getEntityTypeRepositoryMock() {
  $entity_type_repository = $this
    ->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
  $entity_type_repository
    ->method('getEntityTypeFromClass')
    ->willReturn('eck_entity_type');
  return $entity_type_repository;
}