mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2204,23 +2204,4 @@ public function test_wp_insert_user_empty_password() { | |
$this->assertSame( 'empty_pre_hash_password', $create_user->get_error_code() ); | ||
$this->assertSame( 'Cannot create a user with an empty password.', $create_user->get_error_message() ); | ||
} | ||
|
||
/** | ||
* Test that an error is returned when the password contains a backslash. | ||
* | ||
* @ticket 49639 | ||
*/ | ||
public function test_wp_insert_user_password_with_backslash() { | ||
$user_data = array( | ||
'user_login' => 'test_user_backslash', | ||
'user_email' => '[email protected]', | ||
'user_pass' => 'password\\123', | ||
); | ||
|
||
$create_user = wp_insert_user( $user_data ); | ||
|
||
$this->assertWPError( $create_user ); | ||
$this->assertSame( 'illegal_pre_hash_password', $create_user->get_error_code() ); | ||
$this->assertSame( 'Passwords may not contain the character "\\".', $create_user->get_error_message() ); | ||
} | ||
} |