function SecureSiteDigestUserStoredTest::testSecureSiteTypeDigestUserStoredCorrect in Secure Site 8
Request home page with correct password.
File
- src/
Tests/ DigestAuth/ SecureSiteDigestUserStoredTest.php, line 65 - Contains Drupal\securesite\Tests\DigestAuth\SecureSiteDigestUserStoredTest
Class
- SecureSiteDigestUserStoredTest
- Functional tests for digest authentication with user credentials.
Namespace
Drupal\securesite\Tests\DigestAuthCode
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'));
}