Changeset 47656 for branches/4.3/tests/phpunit/tests/user.php
- Timestamp:
- 04/29/2020 04:48:42 PM (5 years ago)
- Location:
- branches/4.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/trunk merged: 47634-47635,47637-47638
- Property svn:mergeinfo changed
-
branches/4.3/tests/phpunit/tests/user.php
r34118 r47656 565 565 } 566 566 567 function test_changing_email_invalidates_password_reset_key() {567 public function test_changing_email_invalidates_password_reset_key() { 568 568 global $wpdb; 569 569 … … 590 590 'user_nicename' => 'cat', 591 591 'user_email' => 'foo@bar.dev', 592 ); 593 wp_update_user( $userdata ); 594 595 $user = get_userdata( $user->ID ); 596 $this->assertEmpty( $user->user_activation_key ); 597 } 598 599 public function test_changing_password_invalidates_password_reset_key() { 600 global $wpdb; 601 602 $user = $this->factory->user->create_and_get(); 603 $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) ); 604 clean_user_cache( $user ); 605 606 $user = get_userdata( $user->ID ); 607 $this->assertEquals( 'key', $user->user_activation_key ); 608 609 $userdata = array( 610 'ID' => $user->ID, 611 'user_pass' => 'password', 592 612 ); 593 613 wp_update_user( $userdata );
Note: See TracChangeset
for help on using the changeset viewer.