public function SecureSiteTypeDigestUserStoredFunctionalTest::testSecureSiteTypeDigestUserStoredCorrect in Secure Site 7.2
Same name and namespace in other branches
- 6.2 securesite.test \SecureSiteTypeDigestUserStoredFunctionalTest::testSecureSiteTypeDigestUserStoredCorrect()
Request home page with correct password.
File
- ./
securesite.test, line 1802 - Tests for Secure Site module.
Class
- SecureSiteTypeDigestUserStoredFunctionalTest
- Functional tests for digest authentication with user credentials.
Code
public function testSecureSiteTypeDigestUserStoredCorrect() {
$this->curl_options[CURLOPT_USERPWD] = $this->user->name . ':' . $this->user->pass_raw;
$this
->drupalHead(NULL);
$this
->assertResponse(200, t('Requesting home page with correct password.'));
module_load_include('inc', 'securesite');
$directives = _securesite_parse_directives($this
->drupalGetHeader('Authentication-Info'));
$this
->assertTrue(isset($directives['rspauth']), t('Checking correct password authentication info.'));
$this
->drupalHead('user/logout');
$this
->assertResponse(401, t('Requesting log-out page'));
}