Skip to content

Commit 2f5d75e

Browse files
committed
Repair tests for Recaptcha
1 parent a57fd86 commit 2f5d75e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Phpbb/TranslationValidator/Validator/FileValidator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,9 @@ public function validateCaptchaValues($originFile, $optParams = '')
680680
{
681681
$jsonContent = $this->openComposerJson($originFile);
682682

683-
if (!$optParams == '')
683+
if ($optParams != '')
684684
{
685685
$jsonContent['extra']['recaptcha-lang'] = $optParams;
686-
//$jsonContent['extra']['turnstile-lang'] = $optParams;
687686
}
688687
// The key 'RECAPTCHA_LANG' must match the list provided by Google, or be left empty
689688
// Check for valid recaptcha-lang: en-GB

tests/FileValidator/ValidateLangTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testValidateLangCaptchas()
4848
$this->validator->validateCaptchaValues('', $reCaptchaLanguage);
4949

5050
$output = $this->output->getMessages();
51-
$expected = Output::ERROR . '-reCaptcha must match a language/country code on https://developers.google.com/recaptcha/docs/language - if no code exists for your language you can use "en" or leave the string empty--RECAPTCHA_LANG';
51+
$expected = Output::ERROR . '-reCaptcha must match a language/country code on https://developers.google.com/recaptcha/docs/language - if no code exists for your language you can use "en".--';
5252

5353
$this->assertEquals($this->output->getMessageCount(Output::ERROR), 1);
5454
$this->assertEquals($output[0], $expected);

0 commit comments

Comments
 (0)