summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-11 11:10:43 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-05-04 10:41:33 +0200
commita2af0aae5e556d603a16aea406f2d8d23f5c7508 (patch)
tree976e8c5e1448e65f96b735325567a82f7854c19e
parent1aeb4c0e8c046ed386d2e52957bf61cba58eefa3 (diff)
downloadnextcloud-server-a2af0aae5e556d603a16aea406f2d8d23f5c7508.tar.gz
nextcloud-server-a2af0aae5e556d603a16aea406f2d8d23f5c7508.zip
Do not make setupMounts() public just because of testing
-rw-r--r--apps/files_sharing/lib/external/manager.php2
-rw-r--r--apps/files_sharing/tests/external/manager.php22
2 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php
index cdd8fac839e..490e5e5003d 100644
--- a/apps/files_sharing/lib/external/manager.php
+++ b/apps/files_sharing/lib/external/manager.php
@@ -94,7 +94,7 @@ class Manager {
}
}
- public function setupMounts() {
+ private function setupMounts() {
// don't setup server-to-server shares if the admin disabled it
if (\OCA\Files_Sharing\Helper::isIncomingServer2serverShareEnabled() === false) {
return false;
diff --git a/apps/files_sharing/tests/external/manager.php b/apps/files_sharing/tests/external/manager.php
index fa98e8af77c..dcb3dfba692 100644
--- a/apps/files_sharing/tests/external/manager.php
+++ b/apps/files_sharing/tests/external/manager.php
@@ -73,19 +73,19 @@ class Manager extends TestCase {
public function testAddBasic() {
$this->instance->addShare('http://example.com', 'foo', 'bar', 'example', 'me', true);
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/example');
}
public function testAddBasicEmptyPassword() {
$this->instance->addShare('http://example.com', 'foo', '', 'example', 'me', true);
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/example');
}
public function testAddNotAcceptedShare() {
$this->instance->addShare('http://example.com', 'foo', 'bar', 'example', 'me', false);
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertNotMount('/example');
}
@@ -95,7 +95,7 @@ class Manager extends TestCase {
$this->assertCount(1, $open);
$this->instance->acceptShare($open[0]['id']);
$this->assertEquals([], $this->instance->getOpenShares());
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/example');
}
@@ -105,38 +105,38 @@ class Manager extends TestCase {
$this->assertCount(1, $open);
$this->instance->declineShare($open[0]['id']);
$this->assertEquals([], $this->instance->getOpenShares());
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertNotMount('/example');
}
public function testSetMountPoint() {
$this->instance->addShare('http://example.com', 'foo', 'bar', 'example', 'me', true);
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/example');
$this->instance->setMountPoint($this->getFullPath('/example'), $this->getFullPath('/renamed'));
$this->mountManager->clear();
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/renamed');
$this->assertNotMount('/example');
}
public function testRemoveShare() {
$this->instance->addShare('http://example.com', 'foo', 'bar', 'example', 'me', true);
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/example');
$this->instance->removeShare($this->getFullPath('/example'));
$this->mountManager->clear();
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertNotMount('/example');
}
public function testRemoveShareForUser() {
$this->instance->addShare('http://example.com', 'foo', 'bar', 'example', 'me', true);
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertMount('/example');
$this->instance->removeUserShares($this->uid);
$this->mountManager->clear();
- $this->instance->setupMounts();
+ \Test_Helper::invokePrivate($this->instance, 'setupMounts');
$this->assertNotMount('/example');
}
}