You are here

public function SecureSiteForceAlwaysFunctionalTest::testSecureSiteForceAlwaysGuest in Secure Site 7.2

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

Request home page for logged in guest.

File

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

Class

SecureSiteForceAlwaysFunctionalTest
Functional tests for page requests with authentication always forced.

Code

public function testSecureSiteForceAlwaysGuest() {
  $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.'));
}