You are here

public function ReCaptchaTest::testVerifyAboveThreshold in reCAPTCHA 7.2

File

recaptcha-php/tests/ReCaptcha/ReCaptchaTest.php, line 144

Class

ReCaptchaTest

Namespace

ReCaptcha

Code

public function testVerifyAboveThreshold() {
  $method = $this
    ->getMockRequestMethod('{"success": true, "score": "0.9"}');
  $rc = new ReCaptcha('secret', $method);
  $response = $rc
    ->setScoreThreshold('0.5')
    ->verify('response');
  $this
    ->assertTrue($response
    ->isSuccess());
}