show POST |
22 |
$result = $_POST; $t->check($result, true);
|
[0.002 ms]
array (
) |
Ok |
exist versions info |
27 |
$info = $t->getClassVersion("Botprotection"); $t->check($info, !empty($info) && $info >= '1.0');
|
[0.129 ms] 1.0 |
Ok |
create new Botprotection |
31 |
session_start(); $botProtection = new Botprotection; $t->check($botProtection, $botProtection instanceof Botprotection);
|
[2.372 ms]
\Botprotection::__set_state(array(
'minInputTime' => 5,
'maxInputTime' => 1200,
'nameset' =>
array (
),
)) |
Ok |
show SESSION |
36 |
$result = $_SESSION; $t->check($result, true);
|
[0.001 ms]
array (
'Botprotection_v1' =>
array (
),
) |
Ok |
get status -1 email1bcc if form not send |
41 |
$status = $botProtection->status('email1bcc', true); $t->checkEqual($status, -1);
|
[0.002 ms]
-1 |
Ok |
check email1bcc if form not send |
45 |
//check email1bcc if form not send $isBot = $botProtection->isBot('email1bcc', true); $t->checkEqual($isBot, false);
|
[0.002 ms]
false |
Ok |
create protection input |
198 |
$htmlBotProtection = $botProtection->protectionInput('email1bcc'); echo $htmlBotProtection; $t->checkOutput('input,Id_email1bcc_0,Id_email1bcc_1,Id_email1bcc_2');
|
[0.023 ms]
|
Ok |
create protection input without javascript |
203 |
$css1 = '#Id_email1bcc1_0,#Id_email1bcc1_1,#Id_email1bcc1_2 {display:none}'; $t->addCss($css1); //add new style $htmlBotProtection = $botProtection->protectionInput('email1bcc1',true); echo $htmlBotProtection; $t->checkOutput('Id_email1bcc1_2,input,Id_email1bcc1_0');
|
[0.006 ms]
|
Ok |
call status after create new protectionInput -> exception |
210 |
$bp = new Botprotection; $protect = $bp->protectionInput('email1bcc2'); $closure = function() use($bp){ $bp->status('email1bcc2'); }; $t->checkException($closure,'ErrorException');
|
[0.007 ms] Exception: ErrorException "status must be called before generating a new protectionInput" |
Ok |
call isBot after create new protectionInput -> exception |
218 |
$closure = function() use($bp){ $bp->isBot('email1bcc2'); }; $t->checkException($closure,'ErrorException');
|
[0.001 ms] Exception: ErrorException "isBot must be called before generating a new protection input" |
Ok |