Changeset 47644 for branches/5.3/tests/phpunit/tests/user.php
- Timestamp:
- 04/29/2020 04:04:20 PM (6 years ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
- Property svn:mergeinfo changed
/trunk merged: 47633-47638
- Property svn:mergeinfo changed
-
branches/5.3/tests/phpunit/tests/user.php
r45874 r47644 1026 1026 } 1027 1027 1028 function test_changing_email_invalidates_password_reset_key() {1028 public function test_changing_email_invalidates_password_reset_key() { 1029 1029 global $wpdb; 1030 1030 … … 1051 1051 'user_nicename' => 'cat', 1052 1052 'user_email' => 'foo@bar.dev', 1053 ); 1054 wp_update_user( $userdata ); 1055 1056 $user = get_userdata( $user->ID ); 1057 $this->assertEmpty( $user->user_activation_key ); 1058 } 1059 1060 public function test_changing_password_invalidates_password_reset_key() { 1061 global $wpdb; 1062 1063 $user = $this->author; 1064 $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) ); 1065 clean_user_cache( $user ); 1066 1067 $user = get_userdata( $user->ID ); 1068 $this->assertEquals( 'key', $user->user_activation_key ); 1069 1070 $userdata = array( 1071 'ID' => $user->ID, 1072 'user_pass' => 'password', 1053 1073 ); 1054 1074 wp_update_user( $userdata );
Note: See TracChangeset
for help on using the changeset viewer.