Skip to content
Snippets Groups Projects
Unverified Commit 07df2282 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2926090 by vaplas, alexpott: Remove dead code from UserCancelTest::testUserCancelUid1()

parent 0652f650
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -99,23 +99,6 @@ public function testUserCancelUid1() { ...@@ -99,23 +99,6 @@ public function testUserCancelUid1() {
\Drupal::service('module_installer')->install(['views']); \Drupal::service('module_installer')->install(['views']);
\Drupal::service('router.builder')->rebuild(); \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. // Try to cancel uid 1's account with a different user.
$admin_user = $this->drupalCreateUser(['administer users']); $admin_user = $this->drupalCreateUser(['administer users']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment