From d58aace6f7452e11f87da7fa94aa2288db651003 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 12 Sep 2013 06:28:25 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/user/slashes.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/tests/user/slashes.php b/tests/phpunit/tests/user/slashes.php index c50567ff60..812a6ab26e 100644 --- a/tests/phpunit/tests/user/slashes.php +++ b/tests/phpunit/tests/user/slashes.php @@ -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 );