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