Avoid undefined variable
notice - wp_insert_user()
expects user_pass
to be passed to it.
See #25282. git-svn-id: https://develop.svn.wordpress.org/trunk@25393 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d1d5bcf036
commit
d58aace6f7
@ -129,7 +129,7 @@ class Tests_User_Slashes extends WP_UnitTestCase {
|
||||
*
|
||||
*/
|
||||
function test_wp_insert_user() {
|
||||
$id = wp_insert_user(array(
|
||||
$id = wp_insert_user( array(
|
||||
'user_login' => 'slash_example_user_3',
|
||||
'role' => 'subscriber',
|
||||
'email' => 'user3@example.com',
|
||||
@ -138,7 +138,8 @@ class Tests_User_Slashes extends WP_UnitTestCase {
|
||||
'nickname' => $this->slash_5,
|
||||
'display_name' => $this->slash_7,
|
||||
'description' => $this->slash_3,
|
||||
));
|
||||
'user_pass' => ''
|
||||
) );
|
||||
$user = get_user_to_edit( $id );
|
||||
|
||||
$this->assertEquals( wp_unslash( $this->slash_1 ), $user->first_name );
|
||||
@ -147,7 +148,7 @@ class Tests_User_Slashes extends WP_UnitTestCase {
|
||||
$this->assertEquals( wp_unslash( $this->slash_7 ), $user->display_name );
|
||||
$this->assertEquals( wp_unslash( $this->slash_3 ), $user->description );
|
||||
|
||||
$id = wp_insert_user(array(
|
||||
$id = wp_insert_user( array(
|
||||
'user_login' => 'slash_example_user_4',
|
||||
'role' => 'subscriber',
|
||||
'email' => 'user3@example.com',
|
||||
@ -156,7 +157,8 @@ class Tests_User_Slashes extends WP_UnitTestCase {
|
||||
'nickname' => $this->slash_6,
|
||||
'display_name' => $this->slash_2,
|
||||
'description' => $this->slash_4,
|
||||
));
|
||||
'user_pass' => ''
|
||||
) );
|
||||
$user = get_user_to_edit( $id );
|
||||
|
||||
$this->assertEquals( wp_unslash( $this->slash_2 ), $user->first_name );
|
||||
|
Loading…
Reference in New Issue
Block a user