function SecureSiteTypeBasicGuestUnsetFunctionalTest::testSecureSiteTypeBasicGuestUnsetRandomNoAccess in Secure Site 6.2
Same name and namespace in other branches
- 7.2 securesite.test \SecureSiteTypeBasicGuestUnsetFunctionalTest::testSecureSiteTypeBasicGuestUnsetRandomNoAccess()
Request home page with random credentials and access disabled.
File
- ./
securesite.test, line 1353 - Tests for Secure Site module.
Class
- SecureSiteTypeBasicGuestUnsetFunctionalTest
- Functional tests for basic authentication with guest credentials unset.
Code
function testSecureSiteTypeBasicGuestUnsetRandomNoAccess() {
db_query("UPDATE {permission} SET perm = '%s' WHERE rid = %d", $this->perm, DRUPAL_ANONYMOUS_RID);
$this->curl_options[CURLOPT_USERPWD] = $this
->randomName() . ':' . user_password();
$this
->drupalGet(NULL);
$this
->assertResponse(401, t('Requesting home page with random credentials and guest access disabled.'));
}