The simpletest (password_policy.test line 407) fails:
GET http://qqq.jon/user/%24user-%3Euid/edit returned 500 (3.88 KB).
The preceeding line is PDO exception. This is because the line $this->drupalPost('user/$user->uid/edit', $edit, t('Save'));
includes $user->uid in the single-quoted literal string.
Elsewhere in test script this string construction uses double-quotes, which works

Comments

aohrvetpv’s picture

Thanks. It is clearly wrong, but I wonder why the test usually passes? I just ran the tests and they all passed.

aohrvetpv’s picture

OK, I see now why it was working for me despite the bug. For example, for uid 3:
1. Nonsense path user/$user->uid/edit requested.
2. User's password is expired, so they are disallowed access to most pages, including user/$user->uid/edit. They are redirected to user/3/edit/account to change their password.
3. POST request still succeeds because the form at user/3/edit/account is the same as at the expected path user/3/edit.

Your site or code must be different, which leads to the bug causing the test to fail.

  • Commit 8c7f47f on 6.x-1.x by AohRveTPV:
    Issue #2288951 by Jons: Simpletest 'Password change successful.' fails...
  • Commit a759727 on 7.x-1.x by AohRveTPV:
    Issue #2288951 by Jons: Simpletest 'Password change successful.' fails...
aohrvetpv’s picture

Status: Active » Fixed
jons’s picture

Issue summary: View changes
jons’s picture

Thanks I'm on D7.28, I'll have a think.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.