You are here

function SecureSiteBasicGuestSetTest::testSecureSiteTypeBasicGuestSetWrong in Secure Site 8

Request home page with random credentials.

File

src/Tests/BasicAuth/SecureSiteBasicGuestSetTest.php, line 73
Contains Drupal\securesite\Tests\BasicAuth\SecureSiteBasicGuestSetTest

Class

SecureSiteBasicGuestSetTest
Functional tests for basic authentication with guest credentials set.

Namespace

Drupal\securesite\Tests\BasicAuth

Code

function testSecureSiteTypeBasicGuestSetWrong() {
  $this->curl_options[CURLOPT_USERPWD] = $this
    ->randomName() . ':' . user_password();
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(401, t('Requesting home page with random credentials.'));
}