Skip to content
Prev Previous commit
Next Next commit
expect invalidateTokensOfUser only be called for seen users
Signed-off-by: Artur Neumann <[email protected]>
  • Loading branch information
individual-it committed May 19, 2023
commit 67bba3537c4659f2afe2d97819d62f0098a7d442
5 changes: 4 additions & 1 deletion apps/oauth2/tests/Controller/SettingsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ public function testDeleteClient() {
// count other users in the db before adding our own
$count = 0;
$function = function (IUser $user) use (&$count) {
$count++;
if ($user->getLastLogin() > 0) {
$count++;
}
};
$userManager->callForAllUsers($function);
$user1 = $userManager->createUser('test101', 'test101');
$user1->updateLastLoginTimestamp();
$tokenProviderMock = $this->getMockBuilder(IAuthTokenProvider::class)->getMock();

// expect one call per user and ensure the correct client name
Expand Down