protected function EntityTypeManagerTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 70 - Contains \Drupal\Tests\Core\Entity\EntityTypeManagerTest.
Class
- EntityTypeManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityTypeManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
protected function setUp() {
parent::setUp();
$this->moduleHandler = $this
->prophesize(ModuleHandlerInterface::class);
$this->moduleHandler
->getImplementations('entity_type_build')
->willReturn([]);
$this->moduleHandler
->alter('entity_type', Argument::type('array'))
->willReturn(NULL);
$this->cacheBackend = $this
->prophesize(CacheBackendInterface::class);
$this->translationManager = $this
->prophesize(TranslationInterface::class);
$this->entityTypeManager = new TestEntityTypeManager(new \ArrayObject(), $this->moduleHandler
->reveal(), $this->cacheBackend
->reveal(), $this->translationManager
->reveal(), $this
->getClassResolverStub());
$this->discovery = $this
->prophesize(DiscoveryInterface::class);
$this->entityTypeManager
->setDiscovery($this->discovery
->reveal());
}