diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/tests/etagpropagation.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/sizepropagation.php | 2 | ||||
-rw-r--r-- | apps/files_versions/tests/command/expiretest.php | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/etagpropagation.php b/apps/files_sharing/tests/etagpropagation.php index 6d23959d66d..35c7012a753 100644 --- a/apps/files_sharing/tests/etagpropagation.php +++ b/apps/files_sharing/tests/etagpropagation.php @@ -74,11 +74,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(); @@ -89,8 +92,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(); @@ -260,6 +265,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); diff --git a/apps/files_versions/tests/command/expiretest.php b/apps/files_versions/tests/command/expiretest.php index 247fb99b767..eb622689c33 100644 --- a/apps/files_versions/tests/command/expiretest.php +++ b/apps/files_versions/tests/command/expiretest.php @@ -26,7 +26,7 @@ use Test\TestCase; class ExpireTest extends TestCase { public function testExpireNonExistingUser() { - $command = new Expire('test', ''); + $command = new Expire($this->getUniqueID('test'), ''); $command->handle(); $this->assertTrue(true); |