diff options
Diffstat (limited to 'apps/files_external/tests/Controller/GlobalStoragesControllerTest.php')
-rw-r--r-- | apps/files_external/tests/Controller/GlobalStoragesControllerTest.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index b2e0a656836..9314488aa08 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -26,11 +26,15 @@ namespace OCA\Files_External\Tests\Controller; +use OC\User\User; use OCA\Files_External\Controller\GlobalStoragesController; use OCA\Files_External\Service\BackendService; +use OCP\IGroupManager; use OCP\IL10N; use OCP\ILogger; use OCP\IRequest; +use OCP\IUserSession; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; class GlobalStoragesControllerTest extends StoragesControllerTest { protected function setUp(): void { @@ -42,12 +46,18 @@ class GlobalStoragesControllerTest extends StoragesControllerTest { $this->service->method('getVisibilityType') ->willReturn(BackendService::VISIBILITY_ADMIN); + $session = $this->createMock(IUserSession::class); + $session->method('getUser') + ->willReturn(new User('test', null, $this->createMock(EventDispatcherInterface::class))); + $this->controller = new GlobalStoragesController( 'files_external', $this->createMock(IRequest::class), $this->createMock(IL10N::class), $this->service, - $this->createMock(ILogger::class) + $this->createMock(ILogger::class), + $session, + $this->createMock(IGroupManager::class), ); } } |