You are here

function SecureSiteFormUserTest::testSecureSiteTypeFormUserNoAccess in Secure Site 8

Request home page with correct password and access disabled.

File

src/Tests/FormAuth/SecureSiteFormUserTest.php, line 67
Contains Drupal\securesite\Tests\FormAuth\SecureSiteFormUserTest

Class

SecureSiteFormUserTest
Functional tests for form authentication with user credentials.

Namespace

Drupal\securesite\Tests\FormAuth

Code

function testSecureSiteTypeFormUserNoAccess() {
  $this
    ->drupalPostForm('', 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.'));
}