You are here

public function SecureSiteTypeDigestUserUnstoredFunctionalTest::testSecureSiteTypeDigestUserUnstoredBasic in Secure Site 7.2

Same name and namespace in other branches
  1. 6.2 securesite.test \SecureSiteTypeDigestUserUnstoredFunctionalTest::testSecureSiteTypeDigestUserUnstoredBasic()

Request home page with basic fall-back.

File

./securesite.test, line 1718
Tests for Secure Site module.

Class

SecureSiteTypeDigestUserUnstoredFunctionalTest
Functional tests for digest authentication with user credentials.

Code

public function testSecureSiteTypeDigestUserUnstoredBasic() {
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(401, t('Requesting home page with basic fall-back.'));
  $found_scheme = FALSE;
  if (stripos($this
    ->drupalGetHeader('WWW-Authenticate'), 'Basic') === 0) {
    $found_scheme = TRUE;
  }
  $this
    ->assertTrue($found_scheme, t('Checking for basic authentication fall-back.'));
}