create a user for Test_Cache_File to allow unit tesing within ci

This commit is contained in:
Thomas Mueller 2012-07-23 22:07:42 +02:00
parent 21631be2ff
commit ab7a2d43e8
1 changed files with 8 additions and 1 deletions

View File

@ -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());