From 40da0f6e0b2a2e0ba00711cfdfded0a657e2d271 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Tue, 9 Nov 2021 16:19:05 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/rest-api/rest-users-controller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/rest-api/rest-users-controller.php b/tests/phpunit/tests/rest-api/rest-users-controller.php index 0c47f935ae..4a28f210a1 100644 --- a/tests/phpunit/tests/rest-api/rest-users-controller.php +++ b/tests/phpunit/tests/rest-api/rest-users-controller.php @@ -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 = 'Error: This email address is already registered. ' . + 'Log in with ' . + 'this address or choose another one.'; + $this->assertSame( $expected, $error['message'] ); } } }