function SecureSiteForceAlwaysTest::testSecureSiteForceAlwaysGuest in Secure Site 8
Request home page for logged in guest.
File
- src/
Tests/ ForcedAuth/ SecureSiteForceAlwaysTest.php, line 69 - Contains Drupal\securesite\Tests\ForcedAuth\SecureSiteForceAlwaysTest
Class
- SecureSiteForceAlwaysTest
- Functional tests for page requests with authentication always forced.
Namespace
Drupal\securesite\Tests\ForcedAuthCode
function testSecureSiteForceAlwaysGuest() {
//todo why curl?
$this->curl_options[CURLOPT_USERPWD] = ':';
$this
->drupalHead(NULL);
unset($this->curl_options[CURLOPT_USERPWD]);
$this
->curlClose();
$this->curl_options[CURLOPT_COOKIE] = $this
->drupalGetHeader('Set-Cookie');
$this
->drupalHead(NULL);
$this
->assertResponse(200, t('Requesting home page for logged-in guest.'));
}