Login and Registration: Fix failing test for "email already exists" registration error improvement.

Follow-up to [52074].

Fixes #53631.

git-svn-id: https://develop.svn.wordpress.org/trunk@52075 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Tonya Mork 2021-11-09 16:19:05 +00:00
parent 4a6df3f37d
commit 40da0f6e0b

View File

@ -1445,7 +1445,10 @@ class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase {
if ( 'user_name' === $error['code'] ) {
$this->assertSame( 'Sorry, that username already exists!', $error['message'] );
} else {
$this->assertSame( 'Sorry, that email address is already used!', $error['message'] );
$expected = '<strong>Error:</strong> This email address is already registered. ' .
'<a href="http://rest.wordpress.org/wp-login.php">Log in</a> with ' .
'this address or choose another one.';
$this->assertSame( $expected, $error['message'] );
}
}
}