function SecureSiteBasicGuestSetTest::setUp in Secure Site 8
Implements setUp().
Overrides WebTestBase::setUp
File
- src/
Tests/ BasicAuth/ SecureSiteBasicGuestSetTest.php, line 45 - Contains Drupal\securesite\Tests\BasicAuth\SecureSiteBasicGuestSetTest
Class
- SecureSiteBasicGuestSetTest
- Functional tests for basic authentication with guest credentials set.
Namespace
Drupal\securesite\Tests\BasicAuthCode
function setUp() {
parent::setUp();
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array(
'access secured pages',
));
$this->name = $this
->randomName();
$this->pass = user_password();
$config = \Drupal::config('securesite.settings');
$config
->set('securesite_guest_name', $this->name);
$config
->set('securesite_guest_pass', $this->pass);
// Should work with all authentication methods enabled.
$config
->set('securesite_type', array(
SECURESITE_FORM,
SECURESITE_BASIC,
SECURESITE_DIGEST,
));
$config
->save();
}