function EntityTest::setUpMockEntityRepository

Reinitializes the entity repository as a mock object.

2 calls to EntityTest::setUpMockEntityRepository()
EntityTest::testCalculateDependenciesWithUuid in core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php
Tests calculate dependencies with uuid.
EntityTest::testRenderWithUuid in core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php
Tests render with uuid.

File

core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php, line 121

Class

EntityTest
Tests Drupal\views\Plugin\views\area\Entity.

Namespace

Drupal\Tests\views\Unit\Plugin\area

Code

protected function setUpMockEntityRepository() : void {
  $this->entityRepository = $this->createMock(EntityRepositoryInterface::class);
  $reflection = new \ReflectionProperty($this->entityHandler, 'entityRepository');
  $reflection->setValue($this->entityHandler, $this->entityRepository);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.