You are here

public function SecureSiteTypeBasicGuestSetFunctionalTest::testSecureSiteTypeBasicGuestSetEmpty in Secure Site 7.2

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

Request home page with empty credentials.

File

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

Class

SecureSiteTypeBasicGuestSetFunctionalTest
Functional tests for basic authentication with guest credentials set.

Code

public function testSecureSiteTypeBasicGuestSetEmpty() {
  $this->curl_options[CURLOPT_USERPWD] = ':';
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(403, t('Requesting home page with empty credentials.'));
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(401, t('Trying to clear credentials by repeating request.'));
}