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