diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-05-21 16:35:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 16:35:39 +0300 |
commit | f1dbabd9109c08e62d6f82124c63201c96ad2203 (patch) | |
tree | ea6b862c1fa97ec5ad03895c120268bd25d1d35e /apps/files_sharing/tests | |
parent | b1ad3faf14140e3c85a7eec1dade88cd551cc747 (diff) | |
parent | 8d7fae8fae054eaa08635fea3ba092196c6f8b84 (diff) |
Merge pull request #26727 from nextcloud/group-exclude-link-share
Add option to exclude groups from creating link shares
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/CapabilitiesTest.php | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index fbe8c832c1d..7f019603e32 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -27,8 +27,24 @@ namespace OCA\Files_Sharing\Tests; +use OC\Share20\Manager; use OCA\Files_Sharing\Capabilities; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\Files\IRootFolder; +use OCP\Files\Mount\IMountManager; use OCP\IConfig; +use OCP\IGroupManager; +use OCP\IL10N; +use OCP\ILogger; +use OCP\IURLGenerator; +use OCP\IUserManager; +use OCP\IUserSession; +use OCP\L10N\IFactory; +use OCP\Mail\IMailer; +use OCP\Security\IHasher; +use OCP\Security\ISecureRandom; +use OCP\Share\IProviderFactory; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * Class CapabilitiesTest @@ -60,7 +76,26 @@ class CapabilitiesTest extends \Test\TestCase { private function getResults(array $map) { $config = $this->getMockBuilder(IConfig::class)->disableOriginalConstructor()->getMock(); $config->method('getAppValue')->willReturnMap($map); - $cap = new Capabilities($config); + $shareManager = new Manager( + $this->createMock(ILogger::class), + $config, + $this->createMock(ISecureRandom::class), + $this->createMock(IHasher::class), + $this->createMock(IMountManager::class), + $this->createMock(IGroupManager::class), + $this->createMock(IL10N::class), + $this->createMock(IFactory::class), + $this->createMock(IProviderFactory::class), + $this->createMock(IUserManager::class), + $this->createMock(IRootFolder::class), + $this->createMock(EventDispatcherInterface::class), + $this->createMock(IMailer::class), + $this->createMock(IURLGenerator::class), + $this->createMock(\OC_Defaults::class), + $this->createMock(IEventDispatcher::class), + $this->createMock(IUserSession::class) + ); + $cap = new Capabilities($config, $shareManager); $result = $this->getFilesSharingPart($cap->getCapabilities()); return $result; } |