function EntityTypeManagerTest::setUp
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::setUp()
- 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeManagerTest.php, line 77
Class
- EntityTypeManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityTypeManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
protected function setUp() : void {
parent::setUp();
$this->moduleHandler = $this->prophesize(ModuleHandlerInterface::class);
$this->cacheBackend = $this->prophesize(CacheBackendInterface::class);
$this->translationManager = $this->prophesize(TranslationInterface::class);
$this->entityLastInstalledSchemaRepository = $this->prophesize(EntityLastInstalledSchemaRepositoryInterface::class);
$container = $this->prophesize(Container::class);
$this->entityTypeManager = new TestEntityTypeManager(new \ArrayObject(), $this->moduleHandler
->reveal(), $this->cacheBackend
->reveal(), $this->translationManager
->reveal(), $this->getClassResolverStub(), $this->entityLastInstalledSchemaRepository
->reveal(), $container->reveal());
$this->discovery = $this->prophesize(DiscoveryInterface::class);
$this->entityTypeManager
->setDiscovery($this->discovery
->reveal());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.