Skip to content

Commit

Permalink
test: Use microtime to set lastLogin
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
Altahrim authored and artonge committed Oct 24, 2024
1 parent 5cce50a commit 6f585ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/lib/User/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ public function testRecentlyActive(): void {
$manager = \OCP\Server::get(IUserManager::class);

// Create some users
$now = (string)time();
$now = (string)microtime(true);
$user1 = $manager->createUser('test_active_1', 'test_active_1');
$config->setUserValue('test_active_1', 'login', 'lastLogin', $now);
$user1->setDisplayName('test active 1');
Expand Down Expand Up @@ -722,6 +722,12 @@ public function testRecentlyActive(): void {
$user3->delete();
$user4->delete();
$user5->delete();

$config->deleteAllUserValues($user1->getUID());
$config->deleteAllUserValues($user2->getUID());
$config->deleteAllUserValues($user3->getUID());
$config->deleteAllUserValues($user4->getUID());
$config->deleteAllUserValues($user5->getUID());
}

public function testDeleteUser(): void {
Expand Down

0 comments on commit 6f585ca

Please sign in to comment.