diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-05-21 15:35:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 15:35:39 +0200 |
commit | f1dbabd9109c08e62d6f82124c63201c96ad2203 (patch) | |
tree | ea6b862c1fa97ec5ad03895c120268bd25d1d35e /apps/files/tests | |
parent | b1ad3faf14140e3c85a7eec1dade88cd551cc747 (diff) | |
parent | 8d7fae8fae054eaa08635fea3ba092196c6f8b84 (diff) | |
download | nextcloud-server-f1dbabd9109c08e62d6f82124c63201c96ad2203.tar.gz nextcloud-server-f1dbabd9109c08e62d6f82124c63201c96ad2203.zip |
Merge pull request #26727 from nextcloud/group-exclude-link-share
Add option to exclude groups from creating link shares
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/Controller/ViewControllerTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index bc233599e34..3453914b27a 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -48,6 +48,7 @@ use OCP\IRequest; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserSession; +use OCP\Share\IManager; use OCP\Template; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Test\TestCase; @@ -84,6 +85,8 @@ class ViewControllerTest extends TestCase { private $initialState; /** @var ITemplateManager|\PHPUnit\Framework\MockObject\MockObject */ private $templateManager; + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ + private $shareManager; protected function setUp(): void { parent::setUp(); @@ -105,6 +108,7 @@ class ViewControllerTest extends TestCase { $this->activityHelper = $this->createMock(Helper::class); $this->initialState = $this->createMock(IInitialState::class); $this->templateManager = $this->createMock(ITemplateManager::class); + $this->shareManager = $this->createMock(IManager::class); $this->viewController = $this->getMockBuilder('\OCA\Files\Controller\ViewController') ->setConstructorArgs([ 'files', @@ -119,6 +123,7 @@ class ViewControllerTest extends TestCase { $this->activityHelper, $this->initialState, $this->templateManager, + $this->shareManager, ]) ->setMethods([ 'getStorageInfo', @@ -153,6 +158,8 @@ class ViewControllerTest extends TestCase { ->expects($this->any()) ->method('getAppValue') ->willReturnArgument(2); + $this->shareManager->method('shareApiAllowLinks') + ->willReturn(true); $nav = new Template('files', 'appnavigation'); $nav->assign('usage_relative', 123); |