summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/tests/FederatedShareProviderTest.php')
-rw-r--r--apps/federatedfilesharing/tests/FederatedShareProviderTest.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index 97d8ccd65c3..d9bc9a7e2ad 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -705,6 +705,38 @@ class FederatedShareProviderTest extends \Test\TestCase {
);
}
+ /**
+ * @dataProvider dataTestFederatedSharingSettings
+ *
+ * @param string $isEnabled
+ * @param bool $expected
+ */
+ public function testIsLookupServerQueriesEnabled($isEnabled, $expected) {
+ $this->config->expects($this->once())->method('getAppValue')
+ ->with('files_sharing', 'lookupServerEnabled', 'no')
+ ->willReturn($isEnabled);
+
+ $this->assertSame($expected,
+ $this->provider->isLookupServerQueriesEnabled()
+ );
+ }
+
+ /**
+ * @dataProvider dataTestFederatedSharingSettings
+ *
+ * @param string $isEnabled
+ * @param bool $expected
+ */
+ public function testIsLookupServerUploadEnabled($isEnabled, $expected) {
+ $this->config->expects($this->once())->method('getAppValue')
+ ->with('files_sharing', 'lookupServerUploadEnabled', 'yes')
+ ->willReturn($isEnabled);
+
+ $this->assertSame($expected,
+ $this->provider->isLookupServerUploadEnabled()
+ );
+ }
+
public function dataTestFederatedSharingSettings() {
return [
['yes', true],