You are here

function SecureSiteTest::testLoginHTTPDeprecated in Secure Site 5

Same name and namespace in other branches
  1. 6 tests/securesite.test \SecureSiteTest::testLoginHTTPDeprecated()

Check that using the deprecated HTTP Auth alternative method doesn't cause sites to be inaccessible (they should be accessible to anonymous users)

File

tests/securesite.test, line 56
Secure Site module unit tests

Class

SecureSiteTest
Unit tests for the Secure Site module

Code

function testLoginHTTPDeprecated() {
  $this
    ->drupalVariableSet('securesite_enabled', SECURESITE_AUTH_ALT);
  $this
    ->drupalVariableSet('securesite_filter_pages_type', SECURESITE_WHITELIST);
  $this
    ->drupalVariableSet('securesite_filter_pages', '');
  $this
    ->drupalGet(url(NULL, NULL, NULL, TRUE));

  // Passing NULL to url() returns the base site path
  $this
    ->assertResponse('200', t('Login: Deprecated HTTP Auth Alt') . ': %s');
  $this
    ->assertNoAuthentication();
}