summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests/Settings
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-05-24 09:07:58 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-05-29 18:19:28 +0200
commit7c2d473d7686f4824d3b7f05238d262e26d5efa2 (patch)
treef4aae21880e293a2ded78e63ee3300b61b5f487f /apps/federatedfilesharing/tests/Settings
parent4be17dff0f9846d32f9740e7d7766bdbc1e98b51 (diff)
downloadnextcloud-server-7c2d473d7686f4824d3b7f05238d262e26d5efa2.tar.gz
nextcloud-server-7c2d473d7686f4824d3b7f05238d262e26d5efa2.zip
add new config switched for the global scale architecture
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/tests/Settings')
-rw-r--r--apps/federatedfilesharing/tests/Settings/AdminTest.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php
index 9eae6317bf7..ce47ffb2385 100644
--- a/apps/federatedfilesharing/tests/Settings/AdminTest.php
+++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php
@@ -25,6 +25,7 @@ namespace OCA\FederatedFileSharing\Tests\Settings;
use OCA\FederatedFileSharing\Settings\Admin;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\GlobalScale\IConfig;
use Test\TestCase;
class AdminTest extends TestCase {
@@ -32,12 +33,17 @@ class AdminTest extends TestCase {
private $admin;
/** @var \OCA\FederatedFileSharing\FederatedShareProvider */
private $federatedShareProvider;
+ /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ private $gsConfig;
public function setUp() {
parent::setUp();
- $this->federatedShareProvider = $this->getMockBuilder('\OCA\FederatedFileSharing\FederatedShareProvider')->disableOriginalConstructor()->getMock();
+ $this->federatedShareProvider = $this->getMockBuilder('\OCA\FederatedFileSharing\FederatedShareProvider')
+ ->disableOriginalConstructor()->getMock();
+ $this->gsConfig = $this->getMock(IConfig::class);
$this->admin = new Admin(
- $this->federatedShareProvider
+ $this->federatedShareProvider,
+ $this->gsConfig
);
}
@@ -73,8 +79,11 @@ class AdminTest extends TestCase {
->expects($this->once())
->method('isLookupServerUploadEnabled')
->willReturn($state);
+ $this->gsConfig->expects($this->once())->method('onlyInternalFederation')
+ ->willReturn($state);
$params = [
+ 'internalOnly' => $state,
'outgoingServer2serverShareEnabled' => $state,
'incomingServer2serverShareEnabled' => $state,
'lookupServerEnabled' => $state,