diff -u b/core/modules/user/tests/src/Kernel/UserDeleteTest.php b/core/modules/user/tests/src/Kernel/UserDeleteTest.php --- b/core/modules/user/tests/src/Kernel/UserDeleteTest.php +++ b/core/modules/user/tests/src/Kernel/UserDeleteTest.php @@ -39,19 +39,6 @@ $uids = [$user_a->id(), $user_b->id(), $user_c->id()]; - /** - * Tests deprecated "delete" access key. - * - * @group legacy - */ - function testDeleteAccessDeprecated(): void { - $this->installSchema('user', ['users_data']); - $this->installEntitySchema('user'); - $account = $this->createUser(); - $this->expectDeprecation('Checking access to the delete operation on the User entity is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use the "cancel" operation instead. See https://www.drupal.org/node/3346438'); - $account->access('delete'); - } - // These users should have a role. $connection = Database::getConnection(); $query = $connection->select('user__roles', 'r'); @@ -86,2 +73,15 @@ + /** + * Tests deprecated "delete" access key. + * + * @group legacy + */ + public function testDeleteAccessDeprecated(): void { + $this->installSchema('user', ['users_data']); + $this->installEntitySchema('user'); + $account = $this->createUser(); + $this->expectDeprecation('Checking access to the delete operation on the User entity is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use the "cancel" operation instead. See https://www.drupal.org/node/3346438'); + $account->access('delete'); + } + }