diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-15 11:57:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-15 11:57:18 +0200 |
commit | 8366dfa50b26632007462699085ef1f8c02ab880 (patch) | |
tree | 21b1fb3eb57b8ce463e463dc762a0f138c375497 /apps/files_sharing/tests | |
parent | c5c23b30b9f510ce211d9fa3187dc3c8cff4116e (diff) | |
download | nextcloud-server-8366dfa50b26632007462699085ef1f8c02ab880.tar.gz nextcloud-server-8366dfa50b26632007462699085ef1f8c02ab880.zip |
Cleanup usage of shareItem in internal code base
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r-- | apps/files_sharing/tests/ApiTest.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/BackendTest.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/ExpireSharesJobTest.php | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 77b409aac06..1b629f66a81 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -1209,7 +1209,7 @@ class ApiTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $id = PHP_INT_MAX - 1; - \OCP\Share::shareItem('file', $id, \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31); + \OC\Share\Share::shareItem('file', $id, \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31); } /** @@ -1222,7 +1222,7 @@ class ApiTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); - \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31); + \OC\Share\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_LINK, self::TEST_FILES_SHARING_API_USER2, 31); } public function datesProvider() { diff --git a/apps/files_sharing/tests/BackendTest.php b/apps/files_sharing/tests/BackendTest.php index b9c7f0e813d..f3ac485c781 100644 --- a/apps/files_sharing/tests/BackendTest.php +++ b/apps/files_sharing/tests/BackendTest.php @@ -74,9 +74,9 @@ class BackendTest extends TestCase { $fileinfo2 = $this->view->getFileInfo($this->folder . $this->subfolder . $this->subsubfolder); $fileinfo3 = $this->view->getFileInfo($this->folder . $this->subfolder . $this->subsubfolder . $this->filename); - $this->assertTrue(\OCP\Share::shareItem('folder', $fileinfo1['fileid'], \OCP\Share::SHARE_TYPE_USER, + $this->assertTrue(\OC\Share\Share::shareItem('folder', $fileinfo1['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31)); - $this->assertTrue(\OCP\Share::shareItem('folder', $fileinfo2['fileid'], \OCP\Share::SHARE_TYPE_USER, + $this->assertTrue(\OC\Share\Share::shareItem('folder', $fileinfo2['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER3, 31)); $backend = new \OCA\Files_Sharing\ShareBackend\Folder(); diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index 6f7bef24b85..0a8d7491a95 100644 --- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -136,7 +136,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { $fileId = $fileInfo->getId(); $this->assertTrue( - \OCP\Share::shareItem('folder', $fileId, \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), + \OC\Share\Share::shareItem('folder', $fileId, \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared "test/sub" with user 2.' ); @@ -159,7 +159,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { \OCP\Share::registerBackend('test', 'Test\Share\Backend'); $this->assertTrue( - \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), + \OC\Share\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared something with user 2.' ); diff --git a/apps/files_sharing/tests/ExpireSharesJobTest.php b/apps/files_sharing/tests/ExpireSharesJobTest.php index 53180f31c56..826efc5ed80 100644 --- a/apps/files_sharing/tests/ExpireSharesJobTest.php +++ b/apps/files_sharing/tests/ExpireSharesJobTest.php @@ -138,7 +138,7 @@ class ExpireSharesJobTest extends \Test\TestCase { $fileInfo = $view->getFileInfo('files/test'); $this->assertNotNull( - \OCP\Share::shareItem('folder', $fileInfo->getId(), \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ), + \OC\Share\Share::shareItem('folder', $fileInfo->getId(), \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared "test" by link.' ); @@ -192,7 +192,7 @@ class ExpireSharesJobTest extends \Test\TestCase { $fileInfo = $view->getFileInfo('files/test'); $this->assertNotNull( - \OCP\Share::shareItem('folder', $fileInfo->getId(), \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), + \OC\Share\Share::shareItem('folder', $fileInfo->getId(), \OCP\Share::SHARE_TYPE_USER, $this->user2, \OCP\Constants::PERMISSION_READ), 'Failed asserting that user 1 successfully shared "test" by link with user2.' ); |