Changeset 47651 for branches/4.6/tests/phpunit/tests/user.php
- Timestamp:
- 04/29/2020 04:24:40 PM (6 years ago)
- Location:
- branches/4.6
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
- Property svn:mergeinfo changed
/trunk merged: 47634-47635,47637-47638
- Property svn:mergeinfo changed
-
branches/4.6/tests/phpunit/tests/user.php
r38005 r47651 925 925 } 926 926 927 function test_changing_email_invalidates_password_reset_key() {927 public function test_changing_email_invalidates_password_reset_key() { 928 928 global $wpdb; 929 929 … … 950 950 'user_nicename' => 'cat', 951 951 'user_email' => 'foo@bar.dev', 952 ); 953 wp_update_user( $userdata ); 954 955 $user = get_userdata( $user->ID ); 956 $this->assertEmpty( $user->user_activation_key ); 957 } 958 959 public function test_changing_password_invalidates_password_reset_key() { 960 global $wpdb; 961 962 $user = $this->author; 963 $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) ); 964 clean_user_cache( $user ); 965 966 $user = get_userdata( $user->ID ); 967 $this->assertEquals( 'key', $user->user_activation_key ); 968 969 $userdata = array( 970 'ID' => $user->ID, 971 'user_pass' => 'password', 952 972 ); 953 973 wp_update_user( $userdata );
Note: See TracChangeset
for help on using the changeset viewer.