diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-03-10 15:37:21 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-11 15:04:01 +0200 |
commit | 449011dae7ea0ec7eb8d6c78e89709982020e709 (patch) | |
tree | e102862917001ace40e23d7126973612cf7f2ac6 /apps/files_sharing/tests | |
parent | 0dea31d48bbd0361cca4d67b9de05a9f9ad3a198 (diff) | |
download | nextcloud-server-449011dae7ea0ec7eb8d6c78e89709982020e709.tar.gz nextcloud-server-449011dae7ea0ec7eb8d6c78e89709982020e709.zip |
remove discovery manager in favour of the OCSDiscoveryService
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/External/ManagerTest.php | 15 |
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); |