You are here

function SecureSiteTest::testPrerequisites in Secure Site 6

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

Check prerequisites

File

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

Class

SecureSiteTest
Unit tests for the Secure Site module

Code

function testPrerequisites() {

  // 'Access secured pages' permission should be disabled for the
  // authenticated or anonymous user for the tests to work correctly
  $this
    ->assertFalse(array_key_exists(DRUPAL_ANONYMOUS_RID, user_roles(FALSE, 'access secured pages')), t('Prerequisite Test #1; failure indicates other test results can\'t be trusted') . ': %s');
  $this
    ->assertFalse(array_key_exists(DRUPAL_AUTHENTICATED_RID, user_roles(FALSE, 'access secured pages')), t('Prerequisite Test #2;  failure indicates other test results can\'t be trusted') . ': %s');
}