Added test create_custom_instance for Blocking Tor, VPN, Abusive and Country filters
This commit is contained in:
parent
7a4354e306
commit
fe7d09730f
|
@ -160,7 +160,7 @@
|
|||
throw new InvalidCaptchaNameException('The given name must not be greater than 120 characters or less than 3 and must be alphanumeric.');
|
||||
|
||||
$captchaInstance->LastUpdatedTimestamp = time();
|
||||
$firewall_options = $captchaInstance->FirewallOptions->toArray()['firewall_options'];
|
||||
$firewall_options = $captchaInstance->FirewallOptions->toArray();
|
||||
|
||||
$Query = QueryBuilder::update('instances', [
|
||||
'name' => $this->vcaptcha->getDatabase()->real_escape_string(urlencode($captchaInstance->Name)),
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
require 'ppm';
|
||||
require 'net.intellivoid.vcaptcha';
|
||||
|
||||
$vcaptcha = new \vCaptcha\vCaptcha();
|
||||
$instance = $vcaptcha->getCaptchaInstanceManager()->createInstance(\vCaptcha\Abstracts\CaptchaType::None, 'netkas', 'Example');
|
||||
$instance->FirewallOptions->DisallowTor = true;
|
||||
$instance->FirewallOptions->DisallowAbusiveHosts = true;
|
||||
$instance->FirewallOptions->HostMismatchProtection = true;
|
||||
$instance = $vcaptcha->getCaptchaInstanceManager()->updateInstance($instance);
|
||||
|
||||
var_dump($instance);
|
Loading…
Reference in New Issue