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