You are here

public function SecureSiteFunctionForcedUnitTest::testSecureSiteFunctionForcedOffline in Secure Site 7.2

Same name and namespace in other branches
  1. 6.2 securesite.test \SecureSiteFunctionForcedUnitTest::testSecureSiteFunctionForcedOffline()

Check output with authentication forced when site is off line.

File

./securesite.test, line 596
Tests for Secure Site module.

Class

SecureSiteFunctionForcedUnitTest
Unit tests for _securesite_forced().

Code

public function testSecureSiteFunctionForcedOffline() {
  variable_set('securesite_enabled', SECURESITE_OFFLINE);
  $this
    ->assertFalse(_securesite_forced(), t('Checking output for on-line site with authentication forced when site is off line.'));
  variable_set('site_offline', TRUE);
  $this
    ->assertTrue(_securesite_forced(), t('Checking output for off-line site with authentication forced when site is off line.'));
}