[Pkg-owncloud-commits] [owncloud] 98/134: fix unit tests

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 21:44:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d8097b48eab8ea1ec5d59da7e9f3277eb2342c7d
Author: Robin Appelman <icewind at owncloud.com>
Date:   Fri Apr 4 13:06:54 2014 +0200

    fix unit tests
---
 apps/files_sharing/tests/cache.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/cache.php
index 4796983..44d73c6 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']));
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list