diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-11-23 13:37:07 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-02-17 10:18:18 +0100 |
commit | 47bc0248858a0a448f938688b0fea5b506e4dd77 (patch) | |
tree | 51ff8c8ab1aa9726979ac0eedaba5826a4e9d4cf /tests | |
parent | 90d2cb09b1a8f4c5a82955641a0afedddb0a590d (diff) | |
download | nextcloud-server-47bc0248858a0a448f938688b0fea5b506e4dd77.tar.gz nextcloud-server-47bc0248858a0a448f938688b0fea5b506e4dd77.zip |
Revert the token scope to not end up with storing the user used in the session
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/DirectEditing/ManagerTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php index e19c44b1a06..7a2f2e3d772 100644 --- a/tests/lib/DirectEditing/ManagerTest.php +++ b/tests/lib/DirectEditing/ManagerTest.php @@ -15,6 +15,7 @@ use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\IDBConnection; use OCP\IL10N; +use OCP\IUser; use OCP\IUserSession; use OCP\L10N\IFactory; use OCP\Security\ISecureRandom; @@ -137,6 +138,14 @@ class ManagerTest extends TestCase { ->method('getUserFolder') ->willReturn($this->userFolder); + $user = $this->createMock(IUser::class); + $user->expects(self::any()) + ->method('getUID') + ->willReturn('admin'); + $this->userSession->expects(self::any()) + ->method('getUser') + ->willReturn($user); + $this->manager = new Manager( $this->random, $this->connection, $this->userSession, $this->rootFolder, $l10nFactory, $this->encryptionManager ); |