diff --git a/tests/Fortify/Actions/CreateNewUserTest.php b/tests/Fortify/Actions/CreateNewUserTest.php index 331dff1d8..972daf8f3 100644 --- a/tests/Fortify/Actions/CreateNewUserTest.php +++ b/tests/Fortify/Actions/CreateNewUserTest.php @@ -119,7 +119,7 @@ 'password' => $this->validPassword, 'password_confirmation' => $this->validPassword, 'terms' => true, - ]), 'email', 'The email must be a valid email address.'); + ]), 'email', 'The email field must be a valid email address.'); }); it('should require the terms to be accepted', function () { @@ -132,7 +132,7 @@ 'password' => $this->validPassword, 'password_confirmation' => $this->validPassword, 'terms' => false, - ]), 'terms', 'The terms must be accepted.'); + ]), 'terms', 'The terms field must be accepted.'); }); it('password should match the confirmation', function () { @@ -145,7 +145,7 @@ 'password' => $this->validPassword, 'password_confirmation' => 'password', 'terms' => true, - ]), 'password_confirmation', 'The password confirmation and password must match.'); + ]), 'password_confirmation', 'The password confirmation field must match password.'); }); it('password should be equal to or longer than 12 characters', function () { @@ -158,7 +158,7 @@ 'password' => 'Sec$r2t', 'password_confirmation' => 'Sec$r2t', 'terms' => true, - ]), 'password', 'The password must be at least 12 characters.'); + ]), 'password', 'The password field must be at least 12 characters.'); }); it('password should require an uppercase letter', function () { @@ -171,7 +171,7 @@ 'password' => 'sec$r2t12345', 'password_confirmation' => 'sec$r2t12345', 'terms' => true, - ]), 'password', 'The password must contain at least one uppercase and one lowercase letter.'); + ]), 'password', 'The password field must contain at least one uppercase and one lowercase letter.'); }); it('password should require one number', function () { @@ -184,7 +184,7 @@ 'password' => 'sec$%Asfhhdfhfdhgd', 'password_confirmation' => 'sec$%Asfhhdfhfdhgd', 'terms' => true, - ]), 'password', 'The password must contain at least one number.'); + ]), 'password', 'The password field must contain at least one number.'); }); it('password should require one special character', function () { @@ -197,7 +197,7 @@ 'password' => 'sec23Asfhhdfhfdhgd', 'password_confirmation' => 'sec23Asfhhdfhfdhgd', 'terms' => true, - ]), 'password', 'The password must contain at least one symbol.'); + ]), 'password', 'The password field must contain at least one symbol.'); }); it('handles the invitation parameter', function () { @@ -308,5 +308,5 @@ 'password' => $this->validPassword, 'password_confirmation' => $this->validPassword, 'terms' => true, - ]))->toThrow('The email must be a valid email address.'); + ]))->toThrow('The email field must be a valid email address.'); }); diff --git a/tests/Fortify/Actions/ResetUserPasswordTest.php b/tests/Fortify/Actions/ResetUserPasswordTest.php index 94f2d0bde..94165b6de 100644 --- a/tests/Fortify/Actions/ResetUserPasswordTest.php +++ b/tests/Fortify/Actions/ResetUserPasswordTest.php @@ -30,7 +30,7 @@ expectValidationError(fn () => resolve(ResetUserPassword::class)->reset($user, [ 'password' => 'pass', - ]), 'password', 'The password must be at least 12 characters.'); + ]), 'password', 'The password field must be at least 12 characters.'); }); it('should throw an exception if the password is too weak', function () { @@ -38,7 +38,7 @@ expectValidationError(fn () => resolve(ResetUserPassword::class)->reset($user, [ 'password' => 'weak', - ]), 'password', 'The password must be at least 12 characters.'); + ]), 'password', 'The password field must be at least 12 characters.'); }); it('should throw an exception if the password is not confirmed', function () { @@ -47,7 +47,7 @@ expectValidationError(fn () => resolve(ResetUserPassword::class)->reset($user, [ 'password' => 'Pas3w05d&123456', 'password_confirmation' => null, - ]), 'password_confirmation', 'The password confirmation and password must match.'); + ]), 'password_confirmation', 'The password confirmation field must match password.'); }); it('should throw an exception if the password confirmation does not match', function () { @@ -56,7 +56,7 @@ expectValidationError(fn () => resolve(ResetUserPassword::class)->reset($user, [ 'password' => 'Pas3w05d&123456', 'password_confirmation' => 'password', - ]), 'password_confirmation', 'The password confirmation and password must match.'); + ]), 'password_confirmation', 'The password confirmation field must match password.'); }); it('should throw an exception if the password is the same', function () { diff --git a/tests/Fortify/Actions/UpdateUserPasswordTest.php b/tests/Fortify/Actions/UpdateUserPasswordTest.php index 11ec79af3..84b9e648c 100644 --- a/tests/Fortify/Actions/UpdateUserPasswordTest.php +++ b/tests/Fortify/Actions/UpdateUserPasswordTest.php @@ -42,7 +42,7 @@ 'current_password' => 'password', 'password' => 'Pas3w05d&', 'password_confirmation' => 'Pas3w05d&', - ]), 'password', 'The password must be at least 12 characters.'); + ]), 'password', 'The password field must be at least 12 characters.'); }); it('should throw an exception if the new password is too weak', function () { @@ -51,7 +51,7 @@ expectValidationError(fn () => resolve(UpdateUserPassword::class)->update($user, [ 'current_password' => 'password', 'password' => 'weak', - ]), 'password', 'The password must be at least 12 characters.'); + ]), 'password', 'The password field must be at least 12 characters.'); }); it('should throw an exception if the new password is not confirmed', function () { @@ -61,7 +61,7 @@ 'current_password' => 'password', 'password' => 'Pas3w05d&123456', 'password_confirmation' => null, - ]), 'password_confirmation', 'The password confirmation and password must match.'); + ]), 'password_confirmation', 'The password confirmation field must match password.'); }); it('should throw an exception if the new password confirmation does not match', function () { @@ -71,5 +71,5 @@ 'current_password' => 'password', 'password' => 'Pas3w05d&123456', 'password_confirmation' => 'password', - ]), 'password_confirmation', 'The password confirmation and password must match.'); + ]), 'password_confirmation', 'The password confirmation field must match password.'); }); diff --git a/tests/Fortify/Actions/UpdateUserProfileInformationTest.php b/tests/Fortify/Actions/UpdateUserProfileInformationTest.php index e4ba526a9..7f8aa247c 100644 --- a/tests/Fortify/Actions/UpdateUserProfileInformationTest.php +++ b/tests/Fortify/Actions/UpdateUserProfileInformationTest.php @@ -87,7 +87,7 @@ expectValidationError(fn () => resolve(UpdateUserProfileInformation::class)->update($user, [ 'name' => str_repeat('a', 2), 'email' => 'jane@doe.com', - ]), 'name', 'The name must be at least 3 characters.'); + ]), 'name', 'The name field must be at least 3 characters.'); }); it('should throw an exception if the name is too long', function () { @@ -96,7 +96,7 @@ expectValidationError(fn () => resolve(UpdateUserProfileInformation::class)->update($user, [ 'name' => 'a'.str_repeat('a', 31), 'email' => 'jane@doe.com', - ]), 'name', 'The name must not be greater than 30 characters.'); + ]), 'name', 'The name field must not be greater than 30 characters.'); }); it('should throw an exception if the email is missing', function () { @@ -114,7 +114,7 @@ expectValidationError(fn () => resolve(UpdateUserProfileInformation::class)->update($user, [ 'name' => 'Jane Doe', 'email' => str_repeat('#', 256).'@doe.com', - ]), 'email', 'The email must not be greater than 255 characters.'); + ]), 'email', 'The email field must not be greater than 255 characters.'); }); it('should throw an exception if the email is not an email', function () { @@ -123,5 +123,5 @@ expectValidationError(fn () => resolve(UpdateUserProfileInformation::class)->update($user, [ 'name' => 'Jane Doe', 'email' => str_repeat('#', 256), - ]), 'email', 'The email must be a valid email address.'); + ]), 'email', 'The email field must be a valid email address.'); }); diff --git a/tests/Fortify/Http/Responses/SuccessfulPasswordResetLinkRequestResponseTest.php b/tests/Fortify/Http/Responses/SuccessfulPasswordResetLinkRequestResponseTest.php index 45bd6e160..524d8fbe8 100644 --- a/tests/Fortify/Http/Responses/SuccessfulPasswordResetLinkRequestResponseTest.php +++ b/tests/Fortify/Http/Responses/SuccessfulPasswordResetLinkRequestResponseTest.php @@ -25,5 +25,5 @@ $response = $response->toResponse($request); expect($response->getStatusCode())->toBe(200); - expect($response->getData('message'))->toBe(['message' => 'We have emailed your password reset link!']); + expect($response->getData('message'))->toBe(['message' => 'We have emailed your password reset link.']); });