diff --git a/modules/datastore/tests/src/Unit/Service/ResourcePurgerTest.php b/modules/datastore/tests/src/Unit/Service/ResourcePurgerTest.php index b6ad52c5b3..ae9d36fb61 100644 --- a/modules/datastore/tests/src/Unit/Service/ResourcePurgerTest.php +++ b/modules/datastore/tests/src/Unit/Service/ResourcePurgerTest.php @@ -6,17 +6,15 @@ use Drupal\Core\Config\ImmutableConfig; use Drupal\Core\DependencyInjection\Container; use Drupal\Core\Entity\Query\QueryInterface; +use Drupal\Core\Entity\RevisionableStorageInterface; use Drupal\Core\Queue\QueueFactory; use Drupal\Core\Queue\QueueInterface; - use Drupal\datastore\DatastoreService; use Drupal\datastore\Service\ResourcePurger; use Drupal\metastore\ReferenceLookupInterface; use Drupal\metastore\Storage\Data; use Drupal\metastore\Storage\DataFactory; use Drupal\node\Entity\Node; -use Drupal\node\NodeStorageInterface; - use MockChain\Chain; use MockChain\Options; use PHPUnit\Framework\TestCase; @@ -63,8 +61,8 @@ public function testRevisionDisappearing() { $chain = $this->getCommonChain() ->add(Data::class, 'getEntityIdFromUuid', 1) - ->add(Data::class, 'getEntityStorage', NodeStorageInterface::class) - ->add(NodeStorageInterface::class, 'getLatestRevisionId', 1); + ->add(Data::class, 'getEntityStorage', RevisionableStorageInterface::class) + ->add(RevisionableStorageInterface::class, 'getLatestRevisionId', 1); $resourcePurger = ResourcePurger::create($chain->getMock()); $voidResult = $resourcePurger->schedule([1], FALSE); @@ -78,11 +76,11 @@ public function testScheduleAllUuids() { $chain = $this->getCommonChain() ->add(Data::class, 'getEntityIdFromUuid', 1) - ->add(Data::class, 'getEntityStorage', NodeStorageInterface::class) - ->add(NodeStorageInterface::class, 'getQuery', QueryInterface::class) + ->add(Data::class, 'getEntityStorage', RevisionableStorageInterface::class) + ->add(RevisionableStorageInterface::class, 'getQuery', QueryInterface::class) ->add(QueryInterface::class, 'condition', QueryInterface::class) ->add(QueryInterface::class, 'execute', [1]) - ->add(NodeStorageInterface::class, 'load', Node::class) + ->add(RevisionableStorageInterface::class, 'load', Node::class) ->add(Node::class, 'uuid', 'foo') ->add(ImmutableConfig::class, 'get', 0);