diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-24 16:49:16 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-24 16:49:16 +0200 |
commit | 89ed2c37bf656ceb772bb6759c8977a7dc78b3fb (patch) | |
tree | 4a467f829fcc748531cad54e7c08e06dd98d1b7d /tests/lib/Files | |
parent | 654cd18864c943d9ff93c2e6151bb6529fa44513 (diff) | |
download | nextcloud-server-89ed2c37bf656ceb772bb6759c8977a7dc78b3fb.tar.gz nextcloud-server-89ed2c37bf656ceb772bb6759c8977a7dc78b3fb.zip |
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 9dbe2a4e10e..036fc038a60 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -21,7 +21,7 @@ use OCP\Files\FileInfo; use OCP\Files\Storage\IStorage; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; -use OCP\Share; +use OCP\Share\IShare; use OCP\Util; use Test\HookHelper; use Test\TestMoveableMountPoint; @@ -243,7 +243,7 @@ class ViewTest extends \Test\TestCase { $this->assertEquals('/foo.txt', $folderView->getPath($id2)); } - + public function testGetPathNotExisting() { $this->expectException(\OCP\Files\NotFoundException::class); @@ -1290,7 +1290,7 @@ class ViewTest extends \Test\TestCase { $this->assertNull($view->getRelativePath(null)); } - + public function testNullAsRoot() { $this->expectException(\InvalidArgumentException::class); @@ -1678,7 +1678,7 @@ class ViewTest extends \Test\TestCase { $share = $shareManager->newShare(); $share->setSharedWith('test2') ->setSharedBy($this->user) - ->setShareType(\OCP\Share::SHARE_TYPE_USER) + ->setShareType(IShare::TYPE_USER) ->setPermissions(\OCP\Constants::PERMISSION_READ) ->setNode($shareDir); $shareManager->createShare($share); @@ -1687,7 +1687,7 @@ class ViewTest extends \Test\TestCase { $this->assertFalse($view->rename('mount1', 'shareddir/sub'), 'Cannot move mount point into shared folder'); $this->assertFalse($view->rename('mount1', 'shareddir/sub/sub2'), 'Cannot move mount point into shared subfolder'); - $this->assertTrue(\OC\Share\Share::unshare('folder', $fileId, Share::SHARE_TYPE_USER, 'test2')); + $this->assertTrue(\OC\Share\Share::unshare('folder', $fileId, IShare::TYPE_USER, 'test2')); $userObject->delete(); } |