function UserControllerTest::testUserEditPage
Tests the redirection to a user edit page.
@covers ::userEditPage
      
    
File
- 
              core/modules/ user/ tests/ src/ Kernel/ Controller/ UserControllerTest.php, line 61 
Class
- UserControllerTest
- Tests for the User controller.
Namespace
Drupal\Tests\user\Kernel\ControllerCode
public function testUserEditPage() {
  $response = $this->userController
    ->userEditPage();
  // Ensure the response is directed to the correct user edit page.
  $edit_url = Url::fromRoute('entity.user.edit_form', [
    'user' => $this->user
      ->id(),
  ])
    ->setAbsolute()
    ->toString();
  $this->assertEquals($edit_url, $response->getTargetUrl());
  $this->assertEquals(302, $response->getStatusCode());
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
