You are here

public function LoginSecurityInterfaceTest::testAdminUserSettings in Login Security 7

Same name and namespace in other branches
  1. 6 login_security.test \LoginSecurityInterfaceTest::testAdminUserSettings()

Test admin user settings.

File

./login_security.test, line 36
Test the basic functions of the Login Security module.

Class

LoginSecurityInterfaceTest
Test login_security interface.

Code

public function testAdminUserSettings() {
  $this
    ->drupalGet('admin/config/people/login_security');
  $this
    ->assertResponse(200, t('Access granted to settings page.'));
  $this
    ->assertField('login_security_track_time', t('Track time field exists.'));
  $this
    ->assertField('login_security_user_wrong_count', t('User wrong count field exists.'));
  $this
    ->assertField('login_security_host_wrong_count', t('Host wrong count field exists.'));
  $this
    ->assertField('login_security_host_wrong_count_hard', t('Host wrong hard count field exists.'));
  $this
    ->assertField('login_security_notice_attempts_available', t('Notice attempts available field exists.'));
  $this
    ->assertField('login_security_notice_attempts_message', t('Notice attempts message field exists.'));
  $this
    ->assertField('login_security_host_soft_banned', t('Soft banned message field exists.'));
  $this
    ->assertField('login_security_host_hard_banned', t('Hard banned message field exists.'));
  $this
    ->assertField('login_security_user_blocked', t('User blocked message field exists.'));
  $this
    ->assertField('login_security_user_blocked_email_user', t('User blocked email notification user field exists.'));
  $this
    ->assertField('login_security_user_blocked_email_subject', t('User blocked email subject field exists.'));
  $this
    ->assertField('login_security_user_blocked_email_body', t('User blocked email body field exists'));
  $this
    ->assertField('login_security_last_login_timestamp', t('Last login timestamp field exists.'));
  $this
    ->assertField('login_security_last_access_timestamp', t('Last access timestamp field exists.'));
  $this
    ->assertField('login_security_login_activity_email_user', t('Login activity email notification user field exists.'));
  $this
    ->assertField('login_security_login_activity_email_subject', t('Login activity email subject field exists.'));
  $this
    ->assertField('login_security_login_activity_email_body', t('Login activity email body field exists.'));
  $this
    ->assertField('login_security_activity_threshold', t('Invalid login threshold field exists.'));
}