Added missing test for new codeGenerator
This commit is contained in:
parent
22c38a484f
commit
be36b31c4e
1 changed files with 8 additions and 0 deletions
|
@ -189,6 +189,14 @@ class AuthTest extends TestCase
|
|||
$this->assertEquals(\mb_strlen(Auth::tokenGenerator(5)), 10);
|
||||
}
|
||||
|
||||
public function testCodeGenerator(): void
|
||||
{
|
||||
$this->assertCount(6, \strlen(Auth::codeGenerator()));
|
||||
$this->assertEquals(\mb_strlen(Auth::codeGenerator()), 256);
|
||||
$this->assertEquals(\mb_strlen(Auth::codeGenerator(5)), 10);
|
||||
$this->assertTrue(is_numeric(Auth::codeGenerator(5)));
|
||||
}
|
||||
|
||||
public function testSessionVerify(): void
|
||||
{
|
||||
$secret = 'secret1';
|
||||
|
|
Loading…
Reference in a new issue