Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Config / Entity / ConfigEntityStorageTest.php
index c4540e17732d07ed8deb6f55d7924ea2129cc146..1cf57dfa5c1377789a13e7e90c8fc160bd79d803 100644 (file)
@@ -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());
@@ -553,7 +554,7 @@ class ConfigEntityStorageTest extends UnitTestCase {
     $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()]);