You are here

protected function UserProtectWebTestBase::assertUserCanEdit in User protect 7

Asserts that an account's edit page can be accessed.

Parameters

object $account: The account to edit.

string $message: (optional) The message to assert.

File

tests/UserProtectWebTestBase.test, line 393
Contains \UserProtectWebTestBase.

Class

UserProtectWebTestBase
Base class for User protect web tests.

Code

protected function assertUserCanEdit($account, $message = NULL) {
  if (!is_null($message)) {
    $message = "The user can be edited.";
  }

  // Access edit page of protected user.
  $this
    ->drupalGet('user/' . $account->uid . '/edit');
  $this
    ->assertResponse(200, $message);
}