Does DrupalWebTestCase::drupalGet() use the permissions of DrupalWebTestCase::$loggedInUser? I'm trying to test the permissions of a particular role, and this code:

$this-&gt;drupalLogin($this-&gt;editor_user);
$this-&gt;drupalGet($node-&gt;path['source']);


returns a 200 (OK) status, when I'm expecting a 403 (forbidden).

Does DrupalWebTestCase::drupalGet() ignore the permissions of the currently logged-in user, and if so, how can I test page view permissions?
Permissions to access the page are considered. ContactPersonalTestCase::testPersonalContactAccess() uses the following code to check users has permission to access the right contact pages.

  // Test allowed access to user with contact form enabled.
  $this-&gt;drupalLogin($this-&gt;web_user);
  $this-&gt;drupalGet('user/' . $this-&gt;contact_user-&gt;uid . '/contact');
  $this-&gt;assertResponse(200);

  // Test denied access to the user's own contact form.
  $this-&gt;drupalGet('user/' . $this-&gt;web_user-&gt;uid . '/contact');
  $this-&gt;assertResponse(403);

  // Test always denied access to the anonymous user contact form.
  $this-&gt;drupalGet('user/0/contact');
  $this-&gt;assertResponse(403);

  // Test that anonymous users can access the contact form.
  $this-&gt;drupalLogout();
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access user contact forms'));
  $this-&gt;drupalGet('user/' . $this-&gt;contact_user-&gt;uid . '/contact');
  $this-&gt;assertResponse(200);


$this-&gt;web_user, and $this-&gt;contact_user are initialized using the following code.

$this-&gt;web_user = $this-&gt;drupalCreateUser(array('access user contact forms'));
$this-&gt;contact_user = $this-&gt;drupalCreateUser();


If the permissions assigned to the test user would not be considered, the first test would fail, as only users with the "access user contact forms" permission can see the contact page of another user, and by default users don't have that permission.