You are here

function SecureSiteBasicGuestUnsetTest::setUp in Secure Site 8

Implements setUp().

Overrides WebTestBase::setUp

File

src/Tests/BasicAuth/SecureSiteBasicGuestUnsetTest.php, line 38
Contains Drupal\securesite\Tests\BasicAuth\SecureSiteBasicGuestUnsetTest

Class

SecureSiteBasicGuestUnsetTest
Functional tests for basic authentication with guest credentials unset.

Namespace

Drupal\securesite\Tests\BasicAuth

Code

function setUp() {
  parent::setUp();
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array(
    'access secured pages',
  ));

  // Should work with all authentication methods enabled.
  \Drupal::config('securesite.settings')
    ->set('securesite_type', array(
    SECURESITE_FORM,
    SECURESITE_BASIC,
    SECURESITE_DIGEST,
  ))
    ->save();

  //todo curl options
  $this->curl_options[CURLOPT_USERPWD] = ':';
}