protected function PasswordPolicyPasswordLengthRestrictionTestCase::submitNotOverlongPassword in Password Policy 7.2
Same name and namespace in other branches
- 7 tests/password_policy.test \PasswordPolicyPasswordLengthRestrictionTestCase::submitNotOverlongPassword()
Submits a password that is not overlong.
1 call to PasswordPolicyPasswordLengthRestrictionTestCase::submitNotOverlongPassword()
- PasswordPolicyPasswordLengthRestrictionTestCase::testOverlongPasswordSubmission in ./
password_policy.test - Sets a password policy that applies to the authenticated user role.
File
- ./
password_policy.test, line 509 - Unit tests for Password policy module.
Class
- PasswordPolicyPasswordLengthRestrictionTestCase
- Tests of restriction on password length.
Code
protected function submitNotOverlongPassword() {
$pass = str_repeat('a', 512);
$edit = array(
'current_pass' => $this->admin->pass_raw,
'pass[pass1]' => $pass,
'pass[pass2]' => $pass,
);
$this
->drupalPost('user/' . $this->admin->uid . '/edit', $edit, t('Save'));
$this
->assertNoText(t('Password exceeds maximum length.'), 'Not-overlong password does not cause form error.');
$this
->assertText(t('The changes have been saved.'), 'Not-overlong password is saved.');
}