use Drupal\Component\Uuid\UuidInterface;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\CacheTagsInvalidatorInterface;
+use Drupal\Core\Cache\MemoryCache\MemoryCache;
use Drupal\Core\Config\Config;
use Drupal\Core\Config\ConfigDuplicateUUIDException;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityMalformedException;
-use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityStorageException;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\Query\QueryFactoryInterface;
use Drupal\Core\Entity\Query\QueryInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
$entity_query_factory = $this->prophesize(QueryFactoryInterface::class);
$entity_query_factory->get($entity_type, 'AND')->willReturn($this->entityQuery->reveal());
- $this->entityStorage = new ConfigEntityStorage($entity_type, $this->configFactory->reveal(), $this->uuidService->reveal(), $this->languageManager->reveal());
+ $this->entityStorage = new ConfigEntityStorage($entity_type, $this->configFactory->reveal(), $this->uuidService->reveal(), $this->languageManager->reveal(), new MemoryCache());
$this->entityStorage->setModuleHandler($this->moduleHandler->reveal());
- $entity_manager = $this->prophesize(EntityManagerInterface::class);
- $entity_manager->getDefinition('test_entity_type')->willReturn($entity_type);
+ $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
+ $entity_type_manager->getDefinition('test_entity_type')->willReturn($entity_type);
$this->cacheTagsInvalidator = $this->prophesize(CacheTagsInvalidatorInterface::class);
$this->configManager = $this->prophesize(ConfigManagerInterface::class);
$container = new ContainerBuilder();
- $container->set('entity.manager', $entity_manager->reveal());
+ $container->set('entity_type.manager', $entity_type_manager->reveal());
$container->set('entity.query.config', $entity_query_factory->reveal());
$container->set('config.typed', $typed_config_manager->reveal());
$container->set('cache_tags.invalidator', $this->cacheTagsInvalidator->reveal());
$bar_config_object->getName()->willReturn('foo');
$this->configFactory->listAll('the_provider.the_config_prefix.')
- ->willReturn(['the_provider.the_config_prefix.foo' , 'the_provider.the_config_prefix.bar']);
+ ->willReturn(['the_provider.the_config_prefix.foo', 'the_provider.the_config_prefix.bar']);
$this->configFactory->loadMultiple(['the_provider.the_config_prefix.foo', 'the_provider.the_config_prefix.bar'])
->willReturn([$foo_config_object->reveal(), $bar_config_object->reveal()]);