]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix encryption test cases when not logged in
authorRobin Appelman <icewind@owncloud.com>
Fri, 29 Jun 2012 23:05:18 +0000 (01:05 +0200)
committerRobin Appelman <icewind@owncloud.com>
Fri, 29 Jun 2012 23:05:18 +0000 (01:05 +0200)
apps/files_encryption/tests/proxy.php

index fcfc4cfb9f0bcd43bb76e5705c09cff82d005eb7..5463836a209da9bffe2aec5b15478ced6c065b79 100644 (file)
@@ -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(){