You are here

function SecureSiteDigestGuestUnsetTest::testSecureSiteTypeDigestGuestUnsetRandom in Secure Site 8

Request home page with random credentials.

File

src/Tests/DigestAuth/SecureSiteDigestGuestUnsetTest.php, line 64
Contains Drupal\securesite\Tests\DigestAuth\SecureSiteDigestGuestUnsetTest

Class

SecureSiteDigestGuestUnsetTest
Functional tests for digest authentication with guest credentials unset.

Namespace

Drupal\securesite\Tests\DigestAuth

Code

function testSecureSiteTypeDigestGuestUnsetRandom() {
  $this->curl_options[CURLOPT_USERPWD] = $this
    ->randomName() . ':' . user_password();
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(200, t('Requesting home page with random credentials.'));
  $this
    ->assertFalse($this
    ->drupalGetHeader('Authentication-Info'), t('Checking digest authentication bypass for random guest credentials.'));
}