From 8a84a23760977d3a31368039c782f6475fd3f810 Mon Sep 17 00:00:00 2001 From: catch Date: Tue, 2 May 2023 19:27:00 +0100 Subject: [PATCH] Issue #3357700 by Tim Bozeman: Ensure that all revisions are cleaned up after deleting a workspace --- .../modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php index 9dd5177c6a25..84319ab5342d 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php @@ -189,6 +189,10 @@ class WorkspaceCRUDTest extends KernelTestBase { // from the "workspace.delete" state entry. \Drupal::service('cron')->run(); + // Check that the actual node revisions were deleted as well. + $node_storage = $this->entityTypeManager->getStorage('node'); + $this->assertEmpty($node_storage->loadMultipleRevisions(array_keys($associated_revisions))); + // 'workspace_2 'is empty now. $associated_revisions = $workspace_association->getAssociatedRevisions($workspace_2->id(), 'node', [$workspace_2_node_1->id()]); $this->assertCount(0, $associated_revisions);