mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
sign list of ids in better download list
This commit is contained in:
@@ -507,4 +507,15 @@ class UserTest extends TestCase {
|
||||
$this->assertEquals(0, $rank->score(), 'userrank-score');
|
||||
$this->assertEquals(1, $rank->rank('downloaded'), 'userrank-rank');
|
||||
}
|
||||
|
||||
public function testUserHash(): void {
|
||||
// ensure the same text hashed by two users is different
|
||||
$second = \GazelleUnitTest\Helper::makeUser('user.' . randomString(6), 'user');
|
||||
$this->assertNotEquals(
|
||||
$this->user->hashHmac('topic', 'phpunit'),
|
||||
$second->hashHmac('topic', 'phpunit'),
|
||||
'user-hash-user-distinct'
|
||||
);
|
||||
$second->remove();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user