summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-08 14:08:56 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-08 14:08:56 +0200
commit17ffa4a244fef9d6cac453f4de9cbeb2b202c90d (patch)
tree5ef9ef9e98076c206253ce3322766f249632edb1 /apps/files_sharing
parentfd5636cda7b4bf752cf34648a0c2b672a586e818 (diff)
parent5646e39248d9ac2bade491dc99c88a10b3dfbc34 (diff)
downloadnextcloud-server-17ffa4a244fef9d6cac453f4de9cbeb2b202c90d.tar.gz
nextcloud-server-17ffa4a244fef9d6cac453f4de9cbeb2b202c90d.zip
Merge pull request #19414 from owncloud/swift_primary_storage_tests
Swift primary storage tests
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/etagpropagation.php6
-rw-r--r--apps/files_sharing/tests/sizepropagation.php2
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/etagpropagation.php b/apps/files_sharing/tests/etagpropagation.php
index f7f8ec35288..2490fef03e1 100644
--- a/apps/files_sharing/tests/etagpropagation.php
+++ b/apps/files_sharing/tests/etagpropagation.php
@@ -75,11 +75,14 @@ class EtagPropagation extends TestCase {
$view1->file_put_contents('/sub1/sub2/folder/file.txt', 'foobar');
$view1->file_put_contents('/sub1/sub2/folder/inside/file.txt', 'foobar');
$folderInfo = $view1->getFileInfo('/sub1/sub2/folder');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
$fileInfo = $view1->getFileInfo('/foo.txt');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $fileInfo);
\OCP\Share::shareItem('file', $fileInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER3, 31);
$folderInfo = $view1->getFileInfo('/directReshare');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31);
$this->fileIds[self::TEST_FILES_SHARING_API_USER1][''] = $view1->getFileInfo('')->getId();
$this->fileIds[self::TEST_FILES_SHARING_API_USER1]['sub1'] = $view1->getFileInfo('sub1')->getId();
@@ -90,8 +93,10 @@ class EtagPropagation extends TestCase {
$view2->mkdir('/sub1/sub2');
$view2->rename('/folder', '/sub1/sub2/folder');
$insideInfo = $view2->getFileInfo('/sub1/sub2/folder/inside');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $insideInfo);
\OCP\Share::shareItem('folder', $insideInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER4, 31);
$folderInfo = $view2->getFileInfo('/directReshare');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
\OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER4, 31);
$this->fileIds[self::TEST_FILES_SHARING_API_USER2][''] = $view2->getFileInfo('')->getId();
$this->fileIds[self::TEST_FILES_SHARING_API_USER2]['sub1'] = $view2->getFileInfo('sub1')->getId();
@@ -261,6 +266,7 @@ class EtagPropagation extends TestCase {
public function testOwnerUnshares() {
$this->loginAsUser(self::TEST_FILES_SHARING_API_USER1);
$folderInfo = $this->rootView->getFileInfo('/' . self::TEST_FILES_SHARING_API_USER1 . '/files/sub1/sub2/folder');
+ $this->assertInstanceOf('\OC\Files\FileInfo', $folderInfo);
$folderId = $folderInfo->getId();
$this->assertTrue(
\OCP\Share::unshare(
diff --git a/apps/files_sharing/tests/sizepropagation.php b/apps/files_sharing/tests/sizepropagation.php
index f46d5a5a7ad..c596003de76 100644
--- a/apps/files_sharing/tests/sizepropagation.php
+++ b/apps/files_sharing/tests/sizepropagation.php
@@ -35,6 +35,7 @@ class SizePropagation extends TestCase {
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'bar');
$sharedFolderInfo = $ownerView->getFileInfo('/sharedfolder', false);
+ $this->assertInstanceOf('\OC\Files\FileInfo', $sharedFolderInfo);
\OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
$ownerRootInfo = $ownerView->getFileInfo('', false);
@@ -67,6 +68,7 @@ class SizePropagation extends TestCase {
$ownerView->file_put_contents('/sharedfolder/subfolder/foo.txt', 'bar');
$sharedFolderInfo = $ownerView->getFileInfo('/sharedfolder', false);
+ $this->assertInstanceOf('\OC\Files\FileInfo', $sharedFolderInfo);
\OCP\Share::shareItem('folder', $sharedFolderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER1, 31);
$ownerRootInfo = $ownerView->getFileInfo('', false);