diff options
author | Julius Härtl <jus@bitgrid.net> | 2023-02-17 11:08:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 11:08:44 +0100 |
commit | d078380aa327e5e4c4335df89ce2cfcbcedaaa21 (patch) | |
tree | 51ff8c8ab1aa9726979ac0eedaba5826a4e9d4cf /tests | |
parent | 90d2cb09b1a8f4c5a82955641a0afedddb0a590d (diff) | |
parent | 47bc0248858a0a448f938688b0fea5b506e4dd77 (diff) | |
download | nextcloud-server-d078380aa327e5e4c4335df89ce2cfcbcedaaa21.tar.gz nextcloud-server-d078380aa327e5e4c4335df89ce2cfcbcedaaa21.zip |
Merge pull request #35360 from nextcloud/bugfix/noid/direct-editing-revert-scope
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 ); |