You are here

function SecureSiteBasicUserTest::testSecureSiteTypeBasicUserWrong in Secure Site 8

Request home page with wrong password.

File

src/Tests/BasicAuth/SecureSiteBasicUserTest.php, line 53
Contains Drupal\securesite\Tests\BasicAuth\SecureSiteBasicUserTest

Class

SecureSiteBasicUserTest
Functional tests for basic authentication with user credentials.

Namespace

Drupal\securesite\Tests\BasicAuth

Code

function testSecureSiteTypeBasicUserWrong() {

  //todo - curl options
  $this->curl_options[CURLOPT_USERPWD] = $this->access_user->name . ':' . $this->access_user->pass;
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(401, t('Requesting home page with wrong password.'));
}