diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-10-13 12:19:07 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-16 21:41:51 +0200 |
commit | a87b34a059ee4bf15359abe39328344ef6433910 (patch) | |
tree | 0a04a8322db51c26156405b482f2d1bb17156c00 | |
parent | 8efd037eb89bfc7d4793ce856e4a429141ffe222 (diff) | |
download | nextcloud-server-a87b34a059ee4bf15359abe39328344ef6433910.tar.gz nextcloud-server-a87b34a059ee4bf15359abe39328344ef6433910.zip |
dont assume home storage is local in trash test
-rw-r--r-- | apps/files_trashbin/tests/trashbin.php | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php index 757239b8cc4..f8e11b01867 100644 --- a/apps/files_trashbin/tests/trashbin.php +++ b/apps/files_trashbin/tests/trashbin.php @@ -600,22 +600,24 @@ class Test_Trashbin extends \Test\TestCase { // delete source folder list($storage, $internalPath) = $this->rootView->resolvePath('/' . self::TEST_TRASHBIN_USER1 . '/files/folder'); - $folderAbsPath = $storage->getSourcePath($internalPath); - // make folder read-only - chmod($folderAbsPath, 0555); + if ($storage instanceof \OC\Files\Storage\Local) { + $folderAbsPath = $storage->getSourcePath($internalPath); + // make folder read-only + chmod($folderAbsPath, 0555); - $this->assertTrue( - OCA\Files_Trashbin\Trashbin::restore( - 'file1.txt.d' . $trashedFile->getMtime(), - $trashedFile->getName(), - $trashedFile->getMtime() - ) - ); + $this->assertTrue( + OCA\Files_Trashbin\Trashbin::restore( + 'file1.txt.d' . $trashedFile->getMtime(), + $trashedFile->getName(), + $trashedFile->getMtime() + ) + ); - $file = $userFolder->get('file1.txt'); - $this->assertEquals('foo', $file->getContent()); + $file = $userFolder->get('file1.txt'); + $this->assertEquals('foo', $file->getContent()); - chmod($folderAbsPath, 0755); + chmod($folderAbsPath, 0755); + } } /** |