You are here

public function SecureSiteTypeFormGuestFunctionalTest::testSecureSiteTypeFormGuestUnsetRandomAccess in Secure Site 7.2

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

Request home page with random credentials and access enabled.

File

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

Class

SecureSiteTypeFormGuestFunctionalTest
Functional tests for form authentication with guest credentials.

Code

public function testSecureSiteTypeFormGuestUnsetRandomAccess() {
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array(
    'access secured pages',
  ));
  $this
    ->drupalPost('', array(
    'name' => $this
      ->randomName(),
    'pass' => user_password(),
  ), 'Log in');
  $this
    ->assertNoFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page with random credentials and guest access enabled.'));
  $this
    ->assertFieldByXPath('//form[@id="user-login-form"]', '', t('Checking for user log-in form when guest access is enabled and random password is given.'));
}