-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account lockout policy - fail if no user id
- Loading branch information
1 parent
597f25f
commit 6240ba8
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,4 +109,28 @@ public function testIsUnlockedSaveLockoutAndNotCompleted() | |
$this->assertInstanceOf(DateTime::class, $userAfter->lockout_time); | ||
$this->assertEquals($userBefore->lockout_time, $userAfter->lockout_time); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function testIsUnlockedWithoutIdButNotEmpty() | ||
{ | ||
$handler = new LockoutHandler(); | ||
$user = [ | ||
'username' => 'user-2', | ||
'email' => '[email protected]' | ||
]; | ||
$actual = $handler->isUnlocked($user); | ||
$this->assertFalse($actual); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function testIsUnlockedWithoutIdAndEmpty() | ||
{ | ||
$handler = new LockoutHandler(); | ||
$actual = $handler->isUnlocked([]); | ||
$this->assertFalse($actual); | ||
} | ||
} |