You are here

function SecureSiteForceAlwaysTest::testSecureSiteForceAlwaysUser in Secure Site 8

Request home page for logged in user.

File

src/Tests/ForcedAuth/SecureSiteForceAlwaysTest.php, line 57
Contains Drupal\securesite\Tests\ForcedAuth\SecureSiteForceAlwaysTest

Class

SecureSiteForceAlwaysTest
Functional tests for page requests with authentication always forced.

Namespace

Drupal\securesite\Tests\ForcedAuth

Code

function testSecureSiteForceAlwaysUser() {
  $config = \Drupal::config('securesite.settings');
  $config
    ->clear('securesite_enabled')
    ->save();
  $this
    ->drupalLogin($this->user);
  $config
    ->set('securesite_enabled', SECURESITE_ALWAYS)
    ->save();
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(200, t('Requesting home page for logged-in user.'));
}