You are here

protected function UserProtectWebTestBase::assertUserNoCanEdit in User protect 7

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

Parameters

object $account: The account to edit.

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

File

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

Class

UserProtectWebTestBase
Base class for User protect web tests.

Code

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

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