public function ReCaptchaTest::testVerifyHostnameMatch in reCAPTCHA 7.2
File
- recaptcha-php/
tests/ ReCaptcha/ ReCaptchaTest.php, line 93
Class
Namespace
ReCaptchaCode
public function testVerifyHostnameMatch() {
$method = $this
->getMockRequestMethod('{"success": true, "hostname": "host.name"}');
$rc = new ReCaptcha('secret', $method);
$response = $rc
->setExpectedHostname('host.name')
->verify('response');
$this
->assertTrue($response
->isSuccess());
}