You are here

function SecureSiteDigestUserUnstoredTest::testSecureSiteTypeDigestUserUnstoredStore in Secure Site 8

Store password with fall-back authentication method.

File

src/Tests/DigestAuth/SecureSiteDigestUserUnstoredTest.php, line 79
Contains Drupal\securesite\Tests\DigestAuth\SecureSiteDigestUserUnstoredTest

Class

SecureSiteDigestUserUnstoredTest
Functional tests for digest authentication with user credentials.

Namespace

Drupal\securesite\Tests\DigestAuth

Code

function testSecureSiteTypeDigestUserUnstoredStore() {
  $this->curl_options[CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST | CURLAUTH_BASIC;
  $this
    ->drupalHead(NULL);
  $this
    ->curlClose();
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(200, t('Storing password with fall-back authentication method.'));
  module_load_include('inc', 'securesite');
  $directives = _securesite_parse_directives($this
    ->drupalGetHeader('Authentication-Info'));
  $this
    ->assertTrue(isset($directives['rspauth']), t('Checking stored password authentication info.'));
}