diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-05-24 09:07:58 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-05-29 18:19:28 +0200 |
commit | 7c2d473d7686f4824d3b7f05238d262e26d5efa2 (patch) | |
tree | f4aae21880e293a2ded78e63ee3300b61b5f487f /apps/federatedfilesharing/tests/Settings | |
parent | 4be17dff0f9846d32f9740e7d7766bdbc1e98b51 (diff) | |
download | nextcloud-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.php | 13 |
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, |