Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobiasKaminsky <tobias@kaminsky.me>2021-10-21 07:52:31 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-11-03 15:24:25 +0300
commit34029fe3c9113d92a16399a0d390eac551c5a27e (patch)
tree98743e6860be14a4e544aa1dca40ff3e07ea00b2
parent0d1f92ccf075c7866246fbe6e1f86a3e4d29ae10 (diff)
Adjust test
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
-rw-r--r--apps/sharebymail/tests/CapabilitiesTest.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php
index 35b6bb6a919..19e91ab51e4 100644
--- a/apps/sharebymail/tests/CapabilitiesTest.php
+++ b/apps/sharebymail/tests/CapabilitiesTest.php
@@ -26,6 +26,7 @@
namespace OCA\ShareByMail\Tests;
use OCA\ShareByMail\Capabilities;
+use OCA\ShareByMail\Settings\SettingsManager;
use OCP\Share\IManager;
use Test\TestCase;
@@ -36,12 +37,16 @@ class CapabilitiesTest extends TestCase {
/** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
private $manager;
+ /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */
+ private $settingsManager;
+
protected function setUp(): void {
parent::setUp();
$this->manager = $this::createMock(IManager::class);
- $this->capabilities = new Capabilities($this->manager);
+ $this->settingsManager = $this::createMock(SettingsManager::class);
+ $this->capabilities = new Capabilities($this->manager, $this->settingsManager);
}
public function testGetCapabilities() {
@@ -51,6 +56,8 @@ class CapabilitiesTest extends TestCase {
->willReturn(false);
$this->manager->method('shareApiLinkDefaultExpireDateEnforced')
->willReturn(false);
+ $this->settingsManager->method('sendPasswordByMail')
+ ->willReturn(true);
$capabilities = [
'files_sharing' =>
@@ -58,6 +65,7 @@ class CapabilitiesTest extends TestCase {
'sharebymail' =>
[
'enabled' => true,
+ 'send_password_by_mail' => true,
'upload_files_drop' => [
'enabled' => true,
],