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