1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

Added missing test for new codeGenerator

This commit is contained in:
Eldad Fux 2022-08-14 19:53:55 +03:00
parent 22c38a484f
commit be36b31c4e

View file

@ -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';