You are here

function SecureSiteFormGuestTest::testSecureSiteTypeFormGuestUnsetRandomNoAccess in Secure Site 8

Request home page with random credentials and access disabled.

File

src/Tests/FormAuth/SecureSiteFormGuestTest.php, line 59
Contains Drupal\securesite\Tests\FormAuth\SecureSiteFormGuestTest

Class

SecureSiteFormGuestTest
Functional tests for form authentication with guest credentials.

Namespace

Drupal\securesite\Tests\FormAuth

Code

function testSecureSiteTypeFormGuestUnsetRandomNoAccess() {
  $this
    ->drupalPostForm('', array(
    'name' => $this
      ->randomName(),
    'pass' => user_password(),
  ), 'Log in');
  $this
    ->assertFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page with random credentials and guest access disabled.'));
  $this
    ->assertText('Unrecognized user name and/or password.', t('Checking for error message when guest access is disabled and random password is given.'));
}