Changeset 35618 for trunk/tests/phpunit/tests/user.php
- Timestamp:
- 11/11/2015 10:30:27 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user.php
r35280 r35618 1014 1014 $this->assertEquals( $pwd_before, $pwd_after ); 1015 1015 } 1016 1017 /** 1018 * @ticket 29880 1019 */ 1020 function test_wp_insert_user() { 1021 $user_details = array( 1022 'user_login' => rand_str(), 1023 'user_pass' => 'password', 1024 'user_email' => rand_str() . '@example.com', 1025 ); 1026 $id1 = wp_insert_user( $user_details ); 1027 $this->assertEquals( $id1, email_exists( $user_details['user_email'] ) ); 1028 1029 // Check that providing an empty password doesn't remove a user's password. 1030 // See ticket #29880 1031 $user_details['ID'] = $id1; 1032 $user_details['user_pass'] = ''; 1033 $id1 = wp_insert_user( $user_details ); 1034 $user = WP_User::get_data_by( 'id', $id1 ); 1035 $this->assertNotEmpty( $user->user_pass ); 1036 } 1037 1016 1038 }
Note: See TracChangeset
for help on using the changeset viewer.