Issue #3357700 by Tim Bozeman: Ensure that all revisions are cleaned up after deleting a workspace

merge-requests/3825/merge
catch 2023-05-02 19:27:00 +01:00
parent 4b2afe955d
commit 8a84a23760
1 changed files with 4 additions and 0 deletions

View File

@ -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);