GlobalStoragesControllerTest.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Robin Appelman <robin@icewind.nl>
  7. * @author Robin McCorkell <robin@mccorkell.me.uk>
  8. * @author Roeland Jago Douma <roeland@famdouma.nl>
  9. * @author Vincent Petry <pvince81@owncloud.com>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. namespace OCA\Files_External\Tests\Controller;
  27. use OCA\Files_External\Controller\GlobalStoragesController;
  28. use OCA\Files_External\Service\BackendService;
  29. use OCP\AppFramework\Http;
  30. use OCP\IL10N;
  31. use OCP\ILogger;
  32. use OCP\IRequest;
  33. class GlobalStoragesControllerTest extends StoragesControllerTest {
  34. protected function setUp(): void {
  35. parent::setUp();
  36. $this->service = $this->getMockBuilder('\OCA\Files_External\Service\GlobalStoragesService')
  37. ->disableOriginalConstructor()
  38. ->getMock();
  39. $this->service->method('getVisibilityType')
  40. ->willReturn(BackendService::VISIBILITY_ADMIN);
  41. $this->controller = new GlobalStoragesController(
  42. 'files_external',
  43. $this->createMock(IRequest::class),
  44. $this->createMock(IL10N::class),
  45. $this->service,
  46. $this->createMock(ILogger::class)
  47. );
  48. }
  49. }