aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share/ShareTest.php
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-03-10 15:37:21 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-11 15:04:01 +0200
commit449011dae7ea0ec7eb8d6c78e89709982020e709 (patch)
treee102862917001ace40e23d7126973612cf7f2ac6 /tests/lib/Share/ShareTest.php
parent0dea31d48bbd0361cca4d67b9de05a9f9ad3a198 (diff)
downloadnextcloud-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 'tests/lib/Share/ShareTest.php')
-rw-r--r--tests/lib/Share/ShareTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php
index 6b0ebd76ed7..40e88d597a4 100644
--- a/tests/lib/Share/ShareTest.php
+++ b/tests/lib/Share/ShareTest.php
@@ -1064,11 +1064,11 @@ class ShareTest extends \Test\TestCase {
$httpHelperMock->expects($this->at(0))
->method('post')
- ->with($this->stringStartsWith('https://' . $urlHost . '/ocs/v1.php/cloud/shares'), $this->anything())
+ ->with($this->stringStartsWith('https://' . $urlHost . '/ocs/v2.php/cloud/shares'), $this->anything())
->willReturn(['success' => false, 'result' => 'Exception']);
$httpHelperMock->expects($this->at(1))
->method('post')
- ->with($this->stringStartsWith('http://' . $urlHost . '/ocs/v1.php/cloud/shares'), $this->anything())
+ ->with($this->stringStartsWith('http://' . $urlHost . '/ocs/v2.php/cloud/shares'), $this->anything())
->willReturn(['success' => true, 'result' => json_encode(['ocs' => ['meta' => ['statuscode' => 100]]])]);
\OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_REMOTE, $shareWith, \OCP\Constants::PERMISSION_READ);
@@ -1077,11 +1077,11 @@ class ShareTest extends \Test\TestCase {
$httpHelperMock->expects($this->at(0))
->method('post')
- ->with($this->stringStartsWith('https://' . $urlHost . '/ocs/v1.php/cloud/shares/' . $share['id'] . '/unshare'), $this->anything())
+ ->with($this->stringStartsWith('https://' . $urlHost . '/ocs/v2.php/cloud/shares/' . $share['id'] . '/unshare'), $this->anything())
->willReturn(['success' => false, 'result' => 'Exception']);
$httpHelperMock->expects($this->at(1))
->method('post')
- ->with($this->stringStartsWith('http://' . $urlHost . '/ocs/v1.php/cloud/shares/' . $share['id'] . '/unshare'), $this->anything())
+ ->with($this->stringStartsWith('http://' . $urlHost . '/ocs/v2.php/cloud/shares/' . $share['id'] . '/unshare'), $this->anything())
->willReturn(['success' => true, 'result' => json_encode(['ocs' => ['meta' => ['statuscode' => 100]]])]);
\OCP\Share::unshare('test', 'test.txt', \OCP\Share::SHARE_TYPE_REMOTE, $shareWith);
@@ -1490,7 +1490,7 @@ class ShareTest extends \Test\TestCase {
$httpHelperMock->expects($this->at(0))
->method('post')
- ->with($this->stringStartsWith('https://localhost/ocs/v1.php/cloud/shares'), $this->anything())
+ ->with($this->stringStartsWith('https://localhost/ocs/v2.php/cloud/shares'), $this->anything())
->willReturn(['success' => true, 'result' => json_encode(['ocs' => ['meta' => ['statuscode' => 100]]])]);
\OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_REMOTE, 'foo@localhost', \OCP\Constants::PERMISSION_READ);
@@ -1507,7 +1507,7 @@ class ShareTest extends \Test\TestCase {
$httpHelperMock->expects($this->at(0))
->method('post')
- ->with($this->stringStartsWith('https://localhost/ocs/v1.php/cloud/shares/' . $share['id'] . '/unshare'), $this->anything())
+ ->with($this->stringStartsWith('https://localhost/ocs/v2.php/cloud/shares/' . $share['id'] . '/unshare'), $this->anything())
->willReturn(['success' => true, 'result' => json_encode(['ocs' => ['meta' => ['statuscode' => 100]]])]);
\OCP\Share::unshare('test', 'test.txt', \OCP\Share::SHARE_TYPE_REMOTE, 'foo@localhost');