You are here

public function UserEditTest::testUserWellKnownChangePasswordAuth in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/user/tests/src/Functional/UserEditTest.php \Drupal\Tests\user\Functional\UserEditTest::testUserWellKnownChangePasswordAuth()
  2. 9 core/modules/user/tests/src/Functional/UserEditTest.php \Drupal\Tests\user\Functional\UserEditTest::testUserWellKnownChangePasswordAuth()

Tests well known change password route redirects to user edit form.

File

core/modules/user/tests/src/Functional/UserEditTest.php, line 180

Class

UserEditTest
Tests user edit page.

Namespace

Drupal\Tests\user\Functional

Code

public function testUserWellKnownChangePasswordAuth() {
  $account = $this
    ->drupalCreateUser([]);
  $this
    ->drupalLogin($account);
  $this
    ->drupalGet('.well-known/change-password');
  $this
    ->assertSession()
    ->addressEquals("user/" . $account
    ->id() . "/edit");
}