public function SecureSiteTypeBasicUserFunctionalTest::testSecureSiteTypeBasicUserAccess in Secure Site 7.2
Same name and namespace in other branches
- 6.2 securesite.test \SecureSiteTypeBasicUserFunctionalTest::testSecureSiteTypeBasicUserAccess()
Request home page with correct password and access enabled.
File
- ./
securesite.test, line 1309 - Tests for Secure Site module.
Class
- SecureSiteTypeBasicUserFunctionalTest
- Functional tests for basic authentication with user credentials.
Code
public function testSecureSiteTypeBasicUserAccess() {
$this->curl_options[CURLOPT_USERPWD] = $this->access_user->name . ':' . $this->access_user->pass_raw;
$this
->drupalGet(NULL);
$this
->assertResponse(200, t('Requesting home page with correct password and access enabled.'));
$this
->assertText($this->access_user->name, t('Checking for user name when password is correct and access is enabled.'));
$this
->assertText('My account', t('Checking for account link when password is correct and access is enabled.'));
$this
->assertText('Log out', t('Checking for log-out link when password is correct and access is enabled.'));
$this
->drupalHead('user/logout');
$this
->assertResponse(401, t('Requesting log-out page.'));
}