diff --git a/tests/phpunit/tests/user.php b/tests/phpunit/tests/user.php
index 7157a00cfa9..181dd963cb3 100644
a
|
b
|
public function test_wp_insert_user_should_not_generate_user_nicename_longer_tha |
934 | 934 | $this->assertSame( $expected, $user->user_nicename ); |
935 | 935 | } |
936 | 936 | |
| 937 | /** |
| 938 | * @ticket 57394 |
| 939 | */ |
| 940 | public function test_wp_insert_user_should_reject_username_that_matches_existing_user_email() { |
| 941 | |
| 942 | $existing_email = get_option( 'admin_email' ); |
| 943 | |
| 944 | $u = wp_insert_user( |
| 945 | array( |
| 946 | 'user_login' => $existing_email, |
| 947 | 'user_email' => 'whatever@example.com', |
| 948 | 'user_pass' => 'whatever', |
| 949 | 'user_nicename' => 'whatever', |
| 950 | ) |
| 951 | ); |
| 952 | |
| 953 | $this->assertWPError( $u ); |
| 954 | $this->assertSame( 'existing_user_login_as_email', $u->get_error_code() ); |
| 955 | } |
| 956 | |
937 | 957 | /** |
938 | 958 | * @ticket 33793 |
939 | 959 | */ |