function SecureSiteDigestGuestSetTest::testSecureSiteDigestGuestSetCorrect in Secure Site 8
Request home page with guest credentials.
File
- src/
Tests/ DigestAuth/ SecureSiteDigestGuestSetTest.php, line 82 - Contains Drupal\securesite\Tests\DigestAuth\SecureSiteDigestGuestSetTest
Class
- SecureSiteDigestGuestSetTest
- Functional tests for digest authentication with guest credentials set.
Namespace
Drupal\securesite\Tests\DigestAuthCode
function testSecureSiteDigestGuestSetCorrect() {
$this->curl_options[CURLOPT_USERPWD] = $this->guest_name . ':' . $this->guest_pass;
$this
->drupalGet(NULL);
$this
->assertResponse(200, t('Requesting home page with guest credentials.'));
module_load_include('inc', 'securesite');
$directives = _securesite_parse_directives($this
->drupalGetHeader('Authentication-Info'));
$this
->assertTrue(isset($directives['rspauth']), t('Checking guest credentials authentication info.'));
}