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

Fixed test

This commit is contained in:
Eldad Fux 2022-08-14 20:22:01 +03:00
parent be36b31c4e
commit bd77354926
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@ App::post('/v1/account')
'phone' => $phone,
'phoneVerification' => false,
'status' => true,
'password' => Auth::passwordHash($password, Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS),
'password' => (!empty($password)) ? Auth::passwordHash($password, Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS) : '',
'hash' => Auth::DEFAULT_ALGO,
'hashOptions' => Auth::DEFAULT_ALGO_OPTIONS,
'passwordUpdate' => \time(),

View file

@ -191,7 +191,7 @@ class AuthTest extends TestCase
public function testCodeGenerator(): void
{
$this->assertCount(6, \strlen(Auth::codeGenerator()));
$this->assertEquals(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)));