You are here

public function SecureSiteTypeFormUserFunctionalTest::testSecureSiteTypeFormUserAccess in Secure Site 7.2

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

Request home page with correct password and access enabled.

File

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

Class

SecureSiteTypeFormUserFunctionalTest
Functional tests for form authentication with user credentials.

Code

public function testSecureSiteTypeFormUserAccess() {
  $this
    ->drupalPost('', array(
    'name' => $this->access_user->name,
    'pass' => $this->access_user->pass_raw,
  ), 'Log in');
  $this
    ->assertNoFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page with correct password and access enabled.'));
  $this
    ->assertText($this->access_user->name, t('Checking for user name when password is correct and access is enabled.'));
  $this
    ->assertText('My account', t('Checking for account link when password is correct and access is enabled.'));
  $this
    ->assertText('Log out', t('Checking for log-out link when password is correct and access is enabled.'));
}