You are here

function SecureSiteFormUserTest::testSecureSiteTypeFormUserAccess in Secure Site 8

Request home page with correct password and access enabled.

File

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

Class

SecureSiteFormUserTest
Functional tests for form authentication with user credentials.

Namespace

Drupal\securesite\Tests\FormAuth

Code

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