function EntityRepositoryTest::setUp
Same name in this branch
- 9 core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::setUp()
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php \Drupal\Tests\Core\Entity\EntityRepositoryTest::setUp()
- 10 core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php \Drupal\Tests\Core\Entity\EntityRepositoryTest::setUp()
- 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Entity/EntityRepositoryTest.php \Drupal\Tests\Core\Entity\EntityRepositoryTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityRepositoryTest.php, line 52
Class
- EntityRepositoryTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityRepository.php/class/EntityRepository/9" title="Provides several mechanisms for retrieving entities." class="local">\Drupal\Core\Entity\EntityRepository</a> @group Entity
Namespace
Drupal\Tests\Core\EntityCode
protected function setUp() : void {
parent::setUp();
$this->entityTypeManager = $this->prophesize(EntityTypeManagerInterface::class);
$this->languageManager = $this->prophesize(LanguageManagerInterface::class);
$this->contextRepository = $this->prophesize(ContextRepositoryInterface::class);
$this->entityRepository = new EntityRepository($this->entityTypeManager
->reveal(), $this->languageManager
->reveal(), $this->contextRepository
->reveal());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.