Tests password reset functionality.
function testUserPasswordReset() {
// Create a user.
$account = $this
->drupalCreateUser();
$this
->drupalLogin($account);
$this
->drupalLogout();
// Attempt to reset password.
$edit = array(
'name' => $account->name,
);
$this
->drupalPost('user/password', $edit, t('E-mail new password'));
// Confirm the password reset.
$this
->assertText(t('Further instructions have been sent to your e-mail address.'), 'Password reset instructions mailed message displayed.');
}