/** * {@inheritdoc} */ 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()); }