aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-09-05 00:27:59 +0200
committerGitHub <noreply@github.com>2023-09-05 00:27:59 +0200
commitfe692f2c7f21392fe2000330c5004759199c29bc (patch)
tree14c5b24964e64ce7930820e4bffae057cf535760 /apps/sharebymail/tests
parente54724728159e96e7f2c24d77a5a22d081f80aac (diff)
parent2592568add097fc702be676f8b59291ac20c446b (diff)
downloadnextcloud-server-fe692f2c7f21392fe2000330c5004759199c29bc.tar.gz
nextcloud-server-fe692f2c7f21392fe2000330c5004759199c29bc.zip
Merge pull request #40192 from nextcloud/feat/sharing-icon-bread
Diffstat (limited to 'apps/sharebymail/tests')
-rw-r--r--apps/sharebymail/tests/CapabilitiesTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php
index 19e91ab51e4..cf8043c5f6e 100644
--- a/apps/sharebymail/tests/CapabilitiesTest.php
+++ b/apps/sharebymail/tests/CapabilitiesTest.php
@@ -27,6 +27,7 @@ namespace OCA\ShareByMail\Tests;
use OCA\ShareByMail\Capabilities;
use OCA\ShareByMail\Settings\SettingsManager;
+use OCP\App\IAppManager;
use OCP\Share\IManager;
use Test\TestCase;
@@ -40,13 +41,17 @@ class CapabilitiesTest extends TestCase {
/** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $settingsManager;
+ /** @var IAppManager | \PHPUnit\Framework\MockObject\MockObject */
+ private $appManager;
+
protected function setUp(): void {
parent::setUp();
$this->manager = $this::createMock(IManager::class);
$this->settingsManager = $this::createMock(SettingsManager::class);
- $this->capabilities = new Capabilities($this->manager, $this->settingsManager);
+ $this->appManager = $this::createMock(IAppManager::class);
+ $this->capabilities = new Capabilities($this->manager, $this->settingsManager, $this->appManager);
}
public function testGetCapabilities() {
@@ -58,6 +63,8 @@ class CapabilitiesTest extends TestCase {
->willReturn(false);
$this->settingsManager->method('sendPasswordByMail')
->willReturn(true);
+ $this->appManager->method('isEnabledForUser')
+ ->willReturn(true);
$capabilities = [
'files_sharing' =>