Changeset 47653 for branches/4.4/tests/phpunit/tests/user.php
- Timestamp:
- 04/29/2020 04:38:31 PM (6 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
- Property svn:mergeinfo changed
/trunk merged: 47634-47635,47637-47638
- Property svn:mergeinfo changed
-
branches/4.4/tests/phpunit/tests/user.php
r35772 r47653 903 903 } 904 904 905 function test_changing_email_invalidates_password_reset_key() {905 public function test_changing_email_invalidates_password_reset_key() { 906 906 global $wpdb; 907 907 … … 928 928 'user_nicename' => 'cat', 929 929 'user_email' => 'foo@bar.dev', 930 ); 931 wp_update_user( $userdata ); 932 933 $user = get_userdata( $user->ID ); 934 $this->assertEmpty( $user->user_activation_key ); 935 } 936 937 public function test_changing_password_invalidates_password_reset_key() { 938 global $wpdb; 939 940 $user = $this->author; 941 $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) ); 942 clean_user_cache( $user ); 943 944 $user = get_userdata( $user->ID ); 945 $this->assertEquals( 'key', $user->user_activation_key ); 946 947 $userdata = array( 948 'ID' => $user->ID, 949 'user_pass' => 'password', 930 950 ); 931 951 wp_update_user( $userdata );
Note: See TracChangeset
for help on using the changeset viewer.