From ab7a2d43e810da66087f3abf4a87afff219a33c0 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Mon, 23 Jul 2012 22:07:42 +0200 Subject: [PATCH] create a user for Test_Cache_File to allow unit tesing within ci --- tests/lib/cache/file.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php index c33c513fcf..be2a2a7277 100644 --- a/tests/lib/cache/file.php +++ b/tests/lib/cache/file.php @@ -22,7 +22,7 @@ class Test_Cache_File extends Test_Cache { function skip() { - $this->skipUnless(OC_User::isLoggedIn()); + //$this->skipUnless(OC_User::isLoggedIn()); } public function setUp(){ @@ -39,6 +39,13 @@ class Test_Cache_File extends Test_Cache { OC_Filesystem::clearMounts(); OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/'); + //login + if (OC_User::userExists('test')) + OC_User::deleteUser('test'); + OC_User::createUser('test', 'testtesttest'); + + OC_User::login('test', 'testtesttest'); + //set up the users dir $rootView=new OC_FilesystemView(''); $rootView->mkdir('/'.OC_User::getUser());