From 07df22824734b5b78aa3465ce4d6e18379ded9b3 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Mon, 7 May 2018 10:55:50 +0100 Subject: [PATCH] Issue #2926090 by vaplas, alexpott: Remove dead code from UserCancelTest::testUserCancelUid1() --- .../tests/src/Functional/UserCancelTest.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/core/modules/user/tests/src/Functional/UserCancelTest.php b/core/modules/user/tests/src/Functional/UserCancelTest.php index 9889cd65bb11..503100c3bcf2 100644 --- a/core/modules/user/tests/src/Functional/UserCancelTest.php +++ b/core/modules/user/tests/src/Functional/UserCancelTest.php @@ -99,23 +99,6 @@ public function testUserCancelUid1() { \Drupal::service('module_installer')->install(['views']); \Drupal::service('router.builder')->rebuild(); - // Update uid 1's name and password to we know it. - $password = user_password(); - $account = [ - 'name' => 'user1', - 'pass' => $this->container->get('password')->hash(trim($password)), - ]; - // We cannot use $account->save() here, because this would result in the - // password being hashed again. - db_update('users_field_data') - ->fields($account) - ->condition('uid', 1) - ->execute(); - - // Reload and log in uid 1. - $user_storage->resetCache([1]); - $user1 = $user_storage->load(1); - $user1->pass_raw = $password; // Try to cancel uid 1's account with a different user. $admin_user = $this->drupalCreateUser(['administer users']); -- GitLab