summaryrefslogtreecommitdiffstats
path: root/tests/lib/cache
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-30 01:14:01 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-30 01:14:01 +0200
commit2c35e185f714f24c6c1a2a53a47e33cf01310ebe (patch)
tree7cc09e2a287ae167bcc457e3058b6b53bdf7ca11 /tests/lib/cache
parentd43ed43b5a5614b05a6949b4a1e757c2c5246254 (diff)
downloadnextcloud-server-2c35e185f714f24c6c1a2a53a47e33cf01310ebe.tar.gz
nextcloud-server-2c35e185f714f24c6c1a2a53a47e33cf01310ebe.zip
make sure the filesystem is setup properly for oc_cache_file tests
Diffstat (limited to 'tests/lib/cache')
-rw-r--r--tests/lib/cache/file.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php
index 226e5068c41..54e60e6569d 100644
--- a/tests/lib/cache/file.php
+++ b/tests/lib/cache/file.php
@@ -21,7 +21,26 @@
*/
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();
}
}