summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/External/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/External/ManagerTest.php')
-rw-r--r--apps/files_sharing/tests/External/ManagerTest.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php
index f2a55babcc7..efe4065e383 100644
--- a/apps/files_sharing/tests/External/ManagerTest.php
+++ b/apps/files_sharing/tests/External/ManagerTest.php
@@ -70,17 +70,14 @@ class ManagerTest extends TestCase {
$this->mountManager = new \OC\Files\Mount\Manager();
$this->clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService')
->disableOriginalConstructor()->getMock();
- $discoveryManager = new DiscoveryManager(
- \OC::$server->getMemCacheFactory(),
- \OC::$server->getHTTPClientService()
- );
+
$this->manager = new Manager(
\OC::$server->getDatabaseConnection(),
$this->mountManager,
new StorageFactory(),
$this->clientService,
\OC::$server->getNotificationManager(),
- $discoveryManager,
+ \OC::$server->getOCSDiscoveryService(),
$this->uid
);
$this->testMountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function() {
@@ -143,7 +140,7 @@ class ManagerTest extends TestCase {
->disableOriginalConstructor()->getMock();
$client->expects($this->once())
->method('post')
- ->with($this->stringStartsWith('http://localhost/ocs/v1.php/cloud/shares/' . $openShares[0]['remote_id']), $this->anything())
+ ->with($this->stringStartsWith('http://localhost/ocs/v2.php/cloud/shares/' . $openShares[0]['remote_id']), $this->anything())
->willReturn($response);
// Accept the first share
@@ -186,7 +183,7 @@ class ManagerTest extends TestCase {
->disableOriginalConstructor()->getMock();
$client->expects($this->once())
->method('post')
- ->with($this->stringStartsWith('http://localhost/ocs/v1.php/cloud/shares/' . $openShares[1]['remote_id'] . '/decline'), $this->anything())
+ ->with($this->stringStartsWith('http://localhost/ocs/v2.php/cloud/shares/' . $openShares[1]['remote_id'] . '/decline'), $this->anything())
->willReturn($response);
// Decline the third share
@@ -226,11 +223,11 @@ class ManagerTest extends TestCase {
->disableOriginalConstructor()->getMock();
$client1->expects($this->once())
->method('post')
- ->with($this->stringStartsWith('http://localhost/ocs/v1.php/cloud/shares/' . $openShares[0]['remote_id'] . '/decline'), $this->anything())
+ ->with($this->stringStartsWith('http://localhost/ocs/v2.php/cloud/shares/' . $openShares[0]['remote_id'] . '/decline'), $this->anything())
->willReturn($response);
$client2->expects($this->once())
->method('post')
- ->with($this->stringStartsWith('http://localhost/ocs/v1.php/cloud/shares/' . $acceptedShares[0]['remote_id'] . '/decline'), $this->anything())
+ ->with($this->stringStartsWith('http://localhost/ocs/v2.php/cloud/shares/' . $acceptedShares[0]['remote_id'] . '/decline'), $this->anything())
->willReturn($response);
$this->manager->removeUserShares($this->uid);