You are here

function SecureSiteForceOfflineTest::testSecureSiteForceOfflineMaintenance in Secure Site 8

Request off-line home page.

File

src/Tests/ForcedAuth/SecureSiteForceOfflineTest.php, line 52
Contains Drupal\securesite\Tests\ForcedAuth\SecureSiteForceOfflineTest

Class

SecureSiteForceOfflineTest
Functional tests for page requests with authentication forced when site is off line.

Namespace

Drupal\securesite\Tests\ForcedAuth

Code

function testSecureSiteForceOfflineMaintenance() {
  \Drupal::state()
    ->set('system.maintenance_mode', 1);
  $this
    ->drupalHead(NULL);
  $this
    ->assertResponse(401, t('Requesting off-line home page.'));
}