function SecureSiteTypeBasicGuestUnsetFunctionalTest::testSecureSiteTypeBasicGuestUnsetEmptyNoAccess in Secure Site 6.2
Same name and namespace in other branches
- 7.2 securesite.test \SecureSiteTypeBasicGuestUnsetFunctionalTest::testSecureSiteTypeBasicGuestUnsetEmptyNoAccess()
Request home page with empty credentials and access disabled.
File
- ./
securesite.test, line 1334 - Tests for Secure Site module.
Class
- SecureSiteTypeBasicGuestUnsetFunctionalTest
- Functional tests for basic authentication with guest credentials unset.
Code
function testSecureSiteTypeBasicGuestUnsetEmptyNoAccess() {
db_query("UPDATE {permission} SET perm = '%s' WHERE rid = %d", $this->perm, DRUPAL_ANONYMOUS_RID);
$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.'));
}