summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-30 01:05:18 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-30 01:05:18 +0200
commit252453cd343b690101189402ecefacf78f6704e2 (patch)
treeb2ce46e92e99d62ca874171dbb039b2cb89def03 /apps/files_encryption
parentc992482e9275af31ab697a9acbecc3ba59e9bf3c (diff)
downloadnextcloud-server-252453cd343b690101189402ecefacf78f6704e2.tar.gz
nextcloud-server-252453cd343b690101189402ecefacf78f6704e2.zip
fix encryption test cases when not logged in
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/tests/proxy.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php
index fcfc4cfb9f0..5463836a209 100644
--- a/apps/files_encryption/tests/proxy.php
+++ b/apps/files_encryption/tests/proxy.php
@@ -11,6 +11,8 @@ class Test_CryptProxy extends UnitTestCase {
private $oldKey;
public function setUp(){
+ $user=OC_User::getUser();
+
$this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption','true');
OCP\Config::setAppValue('files_encryption','enable_encryption','true');
$this->oldKey=isset($_SESSION['enckey'])?$_SESSION['enckey']:null;
@@ -30,10 +32,12 @@ class Test_CryptProxy extends UnitTestCase {
OC_Filesystem::clearMounts();
OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/');
+ OC_Filesystem::init('/'.$user.'/files');
+
//set up the users home folder in the temp storage
$rootView=new OC_FilesystemView('');
- $rootView->mkdir('/'.OC_User::getUser());
- $rootView->mkdir('/'.OC_User::getUser().'/files');
+ $rootView->mkdir('/'.$user);
+ $rootView->mkdir('/'.$user.'/files');
}
public function tearDown(){