diff --git a/ReCaptchaContact/Test/Integration/ContactFormTest.php b/ReCaptchaContact/Test/Integration/ContactFormTest.php index d797d681..107dadf7 100644 --- a/ReCaptchaContact/Test/Integration/ContactFormTest.php +++ b/ReCaptchaContact/Test/Integration/ContactFormTest.php @@ -150,7 +150,7 @@ public function testPostRequestIfReCaptchaParameterIsMissed() $this->setConfig(true, 'test_public_key', 'test_private_key'); $this->expectException(InputException::class); - $this->expectExceptionMessage('Can not resolve reCAPTCHA parameter.'); + $this->expectExceptionMessage('reCAPTCHA is required.'); $this->checkPostResponse(false); } diff --git a/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php b/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php index ec79e14f..9809c879 100644 --- a/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/CreateCustomerFormTest.php @@ -174,7 +174,7 @@ public function testPostRequestIfReCaptchaParameterIsMissed() $this->setConfig(true, 'test_public_key', 'test_private_key'); $this->expectException(InputException::class); - $this->expectExceptionMessage('Can not resolve reCAPTCHA parameter.'); + $this->expectExceptionMessage('reCAPTCHA is required.'); $this->checkPostResponse(false); } diff --git a/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php b/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php index 8752b4be..9ee315d5 100644 --- a/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php +++ b/ReCaptchaCustomer/Test/Integration/ForgotPasswordFormTest.php @@ -167,7 +167,7 @@ public function testPostRequestIfReCaptchaParameterIsMissed() $this->setConfig(true, 'test_public_key', 'test_private_key'); $this->expectException(InputException::class); - $this->expectExceptionMessage('Can not resolve reCAPTCHA parameter.'); + $this->expectExceptionMessage('reCAPTCHA is required.'); $this->checkPostResponse(false); } diff --git a/ReCaptchaCustomer/Test/Integration/LoginFromTest.php b/ReCaptchaCustomer/Test/Integration/LoginFromTest.php index 4385522e..8cb9f87e 100644 --- a/ReCaptchaCustomer/Test/Integration/LoginFromTest.php +++ b/ReCaptchaCustomer/Test/Integration/LoginFromTest.php @@ -166,7 +166,7 @@ public function testPostRequestIfReCaptchaParameterIsMissed() $this->setConfig(true, 'test_public_key', 'test_private_key'); $this->expectException(InputException::class); - $this->expectExceptionMessage('Can not resolve reCAPTCHA parameter.'); + $this->expectExceptionMessage('reCAPTCHA is required.'); $this->checkPostResponse(false); } diff --git a/ReCaptchaUi/Model/CaptchaResponseResolver.php b/ReCaptchaUi/Model/CaptchaResponseResolver.php index 53c92d86..42480a92 100644 --- a/ReCaptchaUi/Model/CaptchaResponseResolver.php +++ b/ReCaptchaUi/Model/CaptchaResponseResolver.php @@ -22,7 +22,7 @@ public function resolve(RequestInterface $request): string { $reCaptchaParam = $request->getParam(self::PARAM_RECAPTCHA); if (empty($reCaptchaParam)) { - throw new InputException(__('Can not resolve reCAPTCHA parameter.')); + throw new InputException(__('reCAPTCHA is required.')); } return $reCaptchaParam; } diff --git a/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php b/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php index 10048ab9..da555c7c 100644 --- a/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php +++ b/ReCaptchaUser/Test/Integration/ForgotPasswordFormTest.php @@ -142,7 +142,7 @@ public function testPostRequestWithSuccessfulReCaptchaValidation() * @magentoAdminConfigFixture recaptcha_backend/type_invisible/private_key test_private_key * @magentoAdminConfigFixture recaptcha_backend/type_for/user_forgot_password invisible * @expectedException \Magento\Framework\Exception\InputException - * @expectedExceptionMessage Can not resolve reCAPTCHA parameter. + * @expectedExceptionMessage reCAPTCHA is required. */ public function testPostRequestIfReCaptchaParameterIsMissed() { diff --git a/ReCaptchaUser/Test/Integration/LoginFormTest.php b/ReCaptchaUser/Test/Integration/LoginFormTest.php index 4d9d8527..1e80cadf 100644 --- a/ReCaptchaUser/Test/Integration/LoginFormTest.php +++ b/ReCaptchaUser/Test/Integration/LoginFormTest.php @@ -169,7 +169,7 @@ public function testPostRequestIfReCaptchaParameterIsMissed() // Location header is different than in the successful case $this->assertRedirect(self::equalTo($this->backendUrl->getUrl('admin'))); $this->assertSessionMessages( - self::equalTo(['Can not resolve reCAPTCHA parameter.']), + self::equalTo(['reCAPTCHA is required.']), MessageInterface::TYPE_ERROR ); self::assertFalse($this->auth->isLoggedIn());