You are here

public function ReCaptchaTest::testVerifyReturnsResponse in reCAPTCHA 7.2

Same name and namespace in other branches
  1. 6.2 recaptcha-php/tests/ReCaptcha/ReCaptchaTest.php \ReCaptcha\ReCaptchaTest::testVerifyReturnsResponse()

File

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

Class

ReCaptchaTest

Namespace

ReCaptcha

Code

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