You are here

function SecureSiteTypeFormUserFunctionalTest::testSecureSiteTypeFormUserNoAccess in Secure Site 6.2

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

Request home page with correct password and access disabled.

File

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

Class

SecureSiteTypeFormUserFunctionalTest
Functional tests for form authentication with user credentials.

Code

function testSecureSiteTypeFormUserNoAccess() {
  $this
    ->drupalPost('', array(
    'name' => $this->normal_user->name,
    'pass' => $this->normal_user->pass_raw,
  ), 'Log in');
  $this
    ->assertNoFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page with correct password and access disabled.'));
  $this
    ->assertText('You have not been authorized to log in to secured pages.', t('Checking for access denied message when password is correct and access is disabled.'));
}