]> source.dussan.org Git - nextcloud-server.git/commitdiff
make sure the filesystem is setup properly for oc_cache_file tests
authorRobin Appelman <icewind@owncloud.com>
Fri, 29 Jun 2012 23:14:01 +0000 (01:14 +0200)
committerRobin Appelman <icewind@owncloud.com>
Fri, 29 Jun 2012 23:14:01 +0000 (01:14 +0200)
tests/lib/cache/file.php

index 226e5068c4148fb91dd708db77fed4dafb4dafa3..54e60e6569ddf623500d748d697bd2d2ac0a3fbe 100644 (file)
 */
 
 class Test_Cache_File extends Test_Cache {
+       function skip() {
+               $this->skipUnless(OC_User::isLoggedIn());
+       }
+       
        public function setUp(){
+               //clear all proxies and hooks so we can do clean testing
+               OC_FileProxy::clearProxies();
+               OC_Hook::clear('OC_Filesystem');
+               
+               //enable only the encryption hook
+               OC_FileProxy::register(new OC_FileProxy_Encryption());
+               
+               //set up temporary storage
+               OC_Filesystem::clearMounts();
+               OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/');
+
+               //set up the users dir
+               $rootView=new OC_FilesystemView('');
+               $rootView->mkdir('/'.OC_User::getUser());
+               
                $this->instance=new OC_Cache_File();
        }
 }