Исправлено поведение TOTP валидатора, если Closure для timestamp возвращает null

This commit is contained in:
ErickSkrauch committed 2017-02-23 02:18:25 +03:00
1 parent 689919fc17
commit 40239b4ee5
2 files changed
+14 -6

No files matched your search

@@ -39,6 +39,13 @@ class TotpValidatorTest extends TestCase {
$result = $this->callProtected($validator, 'validateValue', $controlTotp->at($at));
$this->assertNull($result);
$at = function() {
return null;
};
$validator->timestamp = $at;
$result = $this->callProtected($validator, 'validateValue', $controlTotp->now());
$this->assertNull($result);
$at = function() {
return time() - 700;
};