Changeset 47652 for branches/4.5/tests/phpunit/tests/user.php
- Timestamp:
- 04/29/2020 04:25:54 PM (5 years ago)
- Location:
- branches/4.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.5
- Property svn:mergeinfo changed
/trunk merged: 47634-47635,47637-47638
- Property svn:mergeinfo changed
-
branches/4.5/tests/phpunit/tests/user.php
r37059 r47652 922 922 } 923 923 924 function test_changing_email_invalidates_password_reset_key() {924 public function test_changing_email_invalidates_password_reset_key() { 925 925 global $wpdb; 926 926 … … 947 947 'user_nicename' => 'cat', 948 948 'user_email' => 'foo@bar.dev', 949 ); 950 wp_update_user( $userdata ); 951 952 $user = get_userdata( $user->ID ); 953 $this->assertEmpty( $user->user_activation_key ); 954 } 955 956 public function test_changing_password_invalidates_password_reset_key() { 957 global $wpdb; 958 959 $user = $this->author; 960 $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) ); 961 clean_user_cache( $user ); 962 963 $user = get_userdata( $user->ID ); 964 $this->assertEquals( 'key', $user->user_activation_key ); 965 966 $userdata = array( 967 'ID' => $user->ID, 968 'user_pass' => 'password', 949 969 ); 950 970 wp_update_user( $userdata );
Note: See TracChangeset
for help on using the changeset viewer.