Skip to content

Commit

Permalink
expect invalidateTokensOfUser only be called for seen users
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Neumann <artur@jankaritech.com>
  • Loading branch information
individual-it committed May 19, 2023
1 parent 66a657f commit c2f71bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/oauth2/tests/Controller/SettingsControllerTest.php
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

0 comments on commit c2f71bf

Please sign in to comment.