Changeset 47645 for branches/5.2/tests/phpunit/tests/user.php
- Timestamp:
- 04/29/2020 04:05:32 PM (6 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/trunk merged: 47633-47638
- Property svn:mergeinfo changed
-
branches/5.2/tests/phpunit/tests/user.php
r44645 r47645 978 978 } 979 979 980 function test_changing_email_invalidates_password_reset_key() {980 public function test_changing_email_invalidates_password_reset_key() { 981 981 global $wpdb; 982 982 … … 1003 1003 'user_nicename' => 'cat', 1004 1004 'user_email' => 'foo@bar.dev', 1005 ); 1006 wp_update_user( $userdata ); 1007 1008 $user = get_userdata( $user->ID ); 1009 $this->assertEmpty( $user->user_activation_key ); 1010 } 1011 1012 public function test_changing_password_invalidates_password_reset_key() { 1013 global $wpdb; 1014 1015 $user = $this->author; 1016 $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) ); 1017 clean_user_cache( $user ); 1018 1019 $user = get_userdata( $user->ID ); 1020 $this->assertEquals( 'key', $user->user_activation_key ); 1021 1022 $userdata = array( 1023 'ID' => $user->ID, 1024 'user_pass' => 'password', 1005 1025 ); 1006 1026 wp_update_user( $userdata );
Note: See TracChangeset
for help on using the changeset viewer.