archetecture security fix
This commit is contained in:
@@ -21,4 +21,15 @@ class UserTest extends TestCase
|
||||
{
|
||||
$this->assertInstanceOf(User::class, new User());
|
||||
}
|
||||
|
||||
public function test_password_mutator_preserves_pbkdf2_hashes(): void
|
||||
{
|
||||
$hash = pbkdf2_hash('secret-password');
|
||||
|
||||
$model = new User();
|
||||
$model->password = $hash;
|
||||
|
||||
$this->assertSame($hash, $model->getAttributes()['password']);
|
||||
$this->assertTrue(verify_stored_password('secret-password', $model->getAttributes()['password']));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user