summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-01-19 16:23:33 +0100
committerRobin Appelman <icewind@owncloud.com>2015-04-13 15:13:03 +0200
commitd16ee4138d80c757485b67abad4ecaa8146cc1a3 (patch)
treed64fdd7dd2e504e5d09d8411604b2337cb802160 /apps/files_sharing/tests
parentd726db74590a35529dadbde45a375b8f50d9ec34 (diff)
downloadnextcloud-server-d16ee4138d80c757485b67abad4ecaa8146cc1a3.tar.gz
nextcloud-server-d16ee4138d80c757485b67abad4ecaa8146cc1a3.zip
Fix test
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/sharedstorage.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/sharedstorage.php b/apps/files_sharing/tests/sharedstorage.php
index 14afdcf9cd4..a1469a74687 100644
--- a/apps/files_sharing/tests/sharedstorage.php
+++ b/apps/files_sharing/tests/sharedstorage.php
@@ -397,7 +397,7 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
* @var \OCP\Files\Storage $sharedStorage
*/
list($sharedStorage,) = $view->resolvePath($this->folder);
- $this->assertInstanceOf('OCA\Files_Sharing\ISharedStorage', $sharedStorage);
+ $this->assertTrue($sharedStorage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage'));
$sourceStorage = new \OC\Files\Storage\Temporary(array());
$sourceStorage->file_put_contents('foo.txt', 'asd');
@@ -405,6 +405,9 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
$sharedStorage->copyFromStorage($sourceStorage, 'foo.txt', 'bar.txt');
$this->assertTrue($sharedStorage->file_exists('bar.txt'));
$this->assertEquals('asd', $sharedStorage->file_get_contents('bar.txt'));
+
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
+ $this->view->unlink($this->folder);
}
public function testMoveFromStorage() {
@@ -423,7 +426,7 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
* @var \OCP\Files\Storage $sharedStorage
*/
list($sharedStorage,) = $view->resolvePath($this->folder);
- $this->assertInstanceOf('OCA\Files_Sharing\ISharedStorage', $sharedStorage);
+ $this->assertTrue($sharedStorage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage'));
$sourceStorage = new \OC\Files\Storage\Temporary(array());
$sourceStorage->file_put_contents('foo.txt', 'asd');
@@ -431,5 +434,8 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
$sharedStorage->moveFromStorage($sourceStorage, 'foo.txt', 'bar.txt');
$this->assertTrue($sharedStorage->file_exists('bar.txt'));
$this->assertEquals('asd', $sharedStorage->file_get_contents('bar.txt'));
+
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
+ $this->view->unlink($this->folder);
}
}