X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FConfig%2FEntity%2FConfigEntityStorageTest.php;h=1cf57dfa5c1377789a13e7e90c8fc160bd79d803;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=01dafab9255bf0ce0c2d61adeed278c0c70d5e13;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/web/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php index 01dafab92..1cf57dfa5 100644 --- a/web/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php +++ b/web/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php @@ -5,6 +5,7 @@ namespace Drupal\Tests\Core\Config\Entity; 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; @@ -17,8 +18,8 @@ use Drupal\Core\Config\ImmutableConfig; 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; @@ -133,11 +134,11 @@ class ConfigEntityStorageTest extends UnitTestCase { $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); @@ -149,7 +150,7 @@ class ConfigEntityStorageTest extends UnitTestCase { $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());