Skip to content

Instantly share code, notes, and snippets.

@salcode
Created August 15, 2014 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salcode/6ac3b3f1abef8287353f to your computer and use it in GitHub Desktop.
Save salcode/6ac3b3f1abef8287353f to your computer and use it in GitHub Desktop.
PHPUnit Method Test to add to WordPress Core tests/user.php for ticket #28435
/**
* @ticket 28435
*/
function test_wp_update_user_no_change_pwd() {
$testuserid = 1;
$user = get_userdata( $testuserid );
$pwd_before = $user->user_pass;
wp_update_user( $user );
// Reload the data
$user = get_userdata( $testuserid );
$pwd_after = $user->user_pass;
$this->assertEquals( $pwd_before, $pwd_after );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment