You are here

public function UserEditTest::testUserWellKnownChangePasswordAnon in Drupal 8

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

Tests well known change password route returns 403 to anonymous user.

File

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

Class

UserEditTest
Tests user edit page.

Namespace

Drupal\Tests\user\Functional

Code

public function testUserWellKnownChangePasswordAnon() {
  $this
    ->drupalGet('.well-known/change-password');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
}