diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php index f17a166..7e4ce72 100644 --- a/core/modules/user/src/Tests/UserCancelTest.php +++ b/core/modules/user/src/Tests/UserCancelTest.php @@ -594,16 +594,19 @@ function testMassUserCancelByAdmin() { $this->assertTrue($user1->isActive(), 'User #1 still exists and is not blocked.'); } + /** + * Tests user cancel with node access. + */ function testUserDeleteWithContentAndNodeAccess() { - $this->container->get('module_installer')->install(['node_access_test']); + \Drupal::service('module_installer')->install(['node_access_test']); // Rebuild node access because private module is enabled. node_access_rebuild(); $account = $this->drupalCreateUser(['access content']); $node = $this->drupalCreateNode(['type' => 'page', 'uid' => $account->id()]); $account->delete(); - $load2 = node_load($node->id(), TRUE); + $load2 = \Drupal::entityTypeManager()->getStorage('node')->load($node->id()); $this->assertTrue(empty($load2)); }