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 <[email protected]>
  • Loading branch information
individual-it committed Jun 15, 2023
1 parent 183e1b9 commit 0be74df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/oauth2/tests/Controller/SettingsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,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 0be74df

Please sign in to comment.