Changeset 54477 for trunk/tests/phpunit/tests/user/retrievePassword.php
- Timestamp:
- 10/11/2022 01:43:20 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/retrievePassword.php
r52606 r54477 48 48 */ 49 49 public function test_retrieve_password_reset_notification_email() { 50 $message = 'Sending password reset notification email failed.'; 51 $this->assertNotWPError( retrieve_password( $this->user->user_login ), $message ); 50 $this->assertNotWPError( retrieve_password( $this->user->user_login ), 'Sending password reset notification email failed.' ); 52 51 } 53 52 … … 65 64 ); 66 65 67 $message = 'Sending password reset notification email succeeded.'; 68 $this->assertWPError( retrieve_password( $this->user->user_login ), $message ); 66 $this->assertWPError( retrieve_password( $this->user->user_login ), 'Sending password reset notification email succeeded.' ); 67 } 68 69 /** 70 * @ticket 53634 71 */ 72 public function test_retrieve_password_should_fetch_user_by_login_if_not_found_by_email() { 73 self::factory()->user->create( 74 array( 75 'user_login' => 'foo@example.com', 76 'user_email' => 'bar@example.com', 77 ) 78 ); 79 80 $this->assertTrue( retrieve_password( 'foo@example.com' ), 'Fetching user by login failed.' ); 81 $this->assertTrue( retrieve_password( 'bar@example.com' ), 'Fetching user by email failed.' ); 69 82 } 70 83 }
Note: See TracChangeset
for help on using the changeset viewer.