diff options
author | Björn Schießle <bjoern@schiessle.org> | 2017-04-12 16:01:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 16:01:07 +0200 |
commit | b90e91144bc8d378f6f52025f04383ae2e7c647b (patch) | |
tree | 616619d3778182ac53e77dc605fc9bded595fc63 /apps/files_sharing/tests/External/ManagerTest.php | |
parent | 3cf2f6e31bca4b704549e428d7fcbf6c4ecd6c37 (diff) | |
parent | 42f40659f664b4cdcdd5f19cf7300ad740aec6a4 (diff) | |
download | nextcloud-server-b90e91144bc8d378f6f52025f04383ae2e7c647b.tar.gz nextcloud-server-b90e91144bc8d378f6f52025f04383ae2e7c647b.zip |
Merge pull request #3614 from nextcloud/discover-federatedsharing-endpoints
Discover federatedsharing endpoints
Diffstat (limited to 'apps/files_sharing/tests/External/ManagerTest.php')
-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..9f60261c203 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->query(\OCP\OCS\IDiscoveryService::class), $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); |