You are here

public function SecureSiteFunctionDialogPageUnitTest::testSecureSiteDialogPageLogin in Secure Site 7.2

Same name and namespace in other branches
  1. 6.2 securesite.test \SecureSiteFunctionDialogPageUnitTest::testSecureSiteDialogPageLogin()

Check output with log-in enabled and password reset disabled.

File

./securesite.test, line 793
Tests for Secure Site module.

Class

SecureSiteFunctionDialogPageUnitTest
Unit tests for _securesite_dialog_page().

Code

public function testSecureSiteDialogPageLogin() {
  variable_set('securesite_type', array(
    SECURESITE_FORM,
  ));
  variable_set('securesite_reset_form', '');
  $page = _securesite_dialog_page();
  $login = strpos($page, 'id="securesite-user-login"') === FALSE;
  $reset = strpos($page, 'id="securesite-user-pass"') === FALSE;
  $message = strpos($page, 'Reload the page to try logging in again.') === FALSE;
  $this
    ->assertTrue(!$login && $reset && $message, t('Checking output with log-in enabled and password reset disabled.'));
}