コード例 #1
0
ファイル: UserTest.php プロジェクト: Folcky/kanboard
 public function testFailedLogin()
 {
     $u = new User($this->container);
     $this->assertEquals(0, $u->getFailedLogin('admin'));
     $this->assertEquals(0, $u->getFailedLogin('not_found'));
     $this->assertTrue($u->incrementFailedLogin('admin'));
     $this->assertTrue($u->incrementFailedLogin('admin'));
     $this->assertEquals(2, $u->getFailedLogin('admin'));
     $this->assertTrue($u->resetFailedLogin('admin'));
     $this->assertEquals(0, $u->getFailedLogin('admin'));
 }