You are here

public function SecureSiteTypeBasicGuestUnsetFunctionalTest::testSecureSiteTypeBasicGuestUnsetEmptyNoAccess in Secure Site 7.2

Same name and namespace in other branches
  1. 6.2 securesite.test \SecureSiteTypeBasicGuestUnsetFunctionalTest::testSecureSiteTypeBasicGuestUnsetEmptyNoAccess()

Request home page with empty credentials and access disabled.

File

./securesite.test, line 1370
Tests for Secure Site module.

Class

SecureSiteTypeBasicGuestUnsetFunctionalTest
Functional tests for basic authentication with guest credentials unset.

Code

public function testSecureSiteTypeBasicGuestUnsetEmptyNoAccess() {
  user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, array(
    'access secured pages',
  ));
  $this
    ->drupalGet(NULL);
  $this
    ->assertResponse(403, t('Requesting home page with empty credentials and guest access disabled.'));
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(401, t('Trying to clear credentials by repeating request.'));
}