diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-04-04 15:06:54 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-04-04 15:07:14 +0400 |
commit | d8097b48eab8ea1ec5d59da7e9f3277eb2342c7d (patch) | |
tree | 36849c107200a19a31e38c55f83e56df3fc63aa1 /apps/files_sharing | |
parent | 1116455b3f5963d9d11b74351b563716d6dac71b (diff) |
fix unit tests
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/tests/cache.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/cache.php index 47969833ab5..44d73c69f6d 100644 --- a/apps/files_sharing/tests/cache.php +++ b/apps/files_sharing/tests/cache.php @@ -250,7 +250,7 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Files\Filesystem::file_put_contents('test.txt', 'foo'); $info = \OC\Files\Filesystem::getFileInfo('test.txt'); - \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \OCP\Share::shareItem('file', $info['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); \OC_Util::tearDownFS(); self::loginHelper(self::TEST_FILES_SHARING_API_USER2); @@ -261,7 +261,7 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base { */ $sharedCache = $sharedStorage->getCache(); - $this->assertEquals('test.txt', $sharedCache->getPathById($info->getId())); + $this->assertEquals('test.txt', $sharedCache->getPathById($info['fileid'])); } public function testGetPathByIdShareSubFolder() { @@ -271,7 +271,7 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base { \OC\Files\Filesystem::touch('foo/bar/test.txt', 'bar'); $folderInfo = \OC\Files\Filesystem::getFileInfo('foo'); $fileInfo = \OC\Files\Filesystem::getFileInfo('foo/bar/test.txt'); - \OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); + \OCP\Share::shareItem('folder', $folderInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL); \OC_Util::tearDownFS(); self::loginHelper(self::TEST_FILES_SHARING_API_USER2); @@ -282,7 +282,7 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base { */ $sharedCache = $sharedStorage->getCache(); - $this->assertEquals('foo', $sharedCache->getPathById($folderInfo->getId())); - $this->assertEquals('foo/bar/test.txt', $sharedCache->getPathById($fileInfo->getId())); + $this->assertEquals('foo', $sharedCache->getPathById($folderInfo['fileid'])); + $this->assertEquals('foo/bar/test.txt', $sharedCache->getPathById($fileInfo['fileid'])); } } |