Skip to content

Commit

Permalink
remove the test for backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
mklute101 committed Sep 17, 2024
1 parent 7c00162 commit 4b0891e
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions tests/phpunit/tests/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
}
}

0 comments on commit 4b0891e

Please sign in to comment.