diff options
| author | Frederic Guillot <fred@kanboard.net> | 2015-09-05 23:30:56 -0400 |
|---|---|---|
| committer | Frederic Guillot <fred@kanboard.net> | 2015-09-05 23:30:56 -0400 |
| commit | 710f2c7bb046b43ec9878ae795a181101f6d7515 (patch) | |
| tree | b62723b6b49c3b6bf2b3ca41a772f552464a9031 /tests/units/AuthenticationTest.php | |
| parent | 94b38dd94bd819168163003beec8ef693f9d9839 (diff) | |
Improve unit tests
Diffstat (limited to 'tests/units/AuthenticationTest.php')
| -rw-r--r-- | tests/units/AuthenticationTest.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/units/AuthenticationTest.php b/tests/units/AuthenticationTest.php deleted file mode 100644 index 75b55ece..00000000 --- a/tests/units/AuthenticationTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -require_once __DIR__.'/Base.php'; - -use Model\User; -use Model\Authentication; - -class AuthenticationTest extends Base -{ - public function testHasCaptcha() - { - $u = new User($this->container); - $a = new Authentication($this->container); - - $this->assertFalse($a->hasCaptcha('not_found')); - $this->assertFalse($a->hasCaptcha('admin')); - - $this->assertTrue($u->incrementFailedLogin('admin')); - $this->assertTrue($u->incrementFailedLogin('admin')); - $this->assertTrue($u->incrementFailedLogin('admin')); - - $this->assertFalse($a->hasCaptcha('not_found')); - $this->assertTrue($a->hasCaptcha('admin')); - } - - public function testHandleFailedLogin() - { - $u = new User($this->container); - $a = new Authentication($this->container); - - $this->assertFalse($u->isLocked('admin')); - - for ($i = 0; $i <= 6; $i++) { - $a->handleFailedLogin('admin'); - } - - $this->assertTrue($u->isLocked('admin')); - } -} |
