You are here

function SecureSiteFormUserTest::testSecureSiteTypeFormUserWrong in Secure Site 8

Request home page with wrong password.

File

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

Class

SecureSiteFormUserTest
Functional tests for form authentication with user credentials.

Namespace

Drupal\securesite\Tests\FormAuth

Code

function testSecureSiteTypeFormUserWrong() {
  $this
    ->drupalPostForm('', array(
    'name' => $this->access_user->name,
    'pass' => $this->access_user->pass,
  ), 'Log in');
  $this
    ->assertFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page with wrong password.'));
  $this
    ->assertText('Unrecognized user name and/or password.', t('Checking for error message when password is wrong.'));
}