function EntityTest::setupEntityTypeManager
Same name and namespace in other branches
- 11.x core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::setupEntityTypeManager()
- 10 core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::setupEntityTypeManager()
- 9 core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::setupEntityTypeManager()
- 8.9.x core/modules/views/tests/src/Unit/Plugin/area/EntityTest.php \Drupal\Tests\views\Unit\Plugin\area\EntityTest::setupEntityTypeManager()
Ensures that the entity type manager returns an entity storage.
6 calls to EntityTest::setupEntityTypeManager()
- EntityTest::testCalculateDependenciesWithEntityId in core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php - Tests calculate dependencies with entity id.
- EntityTest::testCalculateDependenciesWithPlaceholder in core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php - Tests calculate dependencies with placeholder.
- EntityTest::testCalculateDependenciesWithUuid in core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php - Tests calculate dependencies with uuid.
- EntityTest::testRenderWithId in core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php - Tests render with id.
- EntityTest::testRenderWithIdAndToken in core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php - Tests render with id and token.
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php, line 127
Class
Namespace
Drupal\Tests\views\Unit\Plugin\areaCode
protected function setupEntityTypeManager() : void {
$this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class);
$this->entityTypeManager
->method('getStorage')
->with('entity_test')
->willReturn($this->entityStorage);
$this->entityTypeManager
->method('getViewBuilder')
->with('entity_test')
->willReturn($this->entityViewBuilder);
$reflection = new \ReflectionProperty($this->entityHandler, 'entityTypeManager');
$reflection->setValue($this->entityHandler, $this->entityTypeManager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.