create a user for Test_Cache_File to allow unit tesing within ci

remotes/origin/stable45
Thomas Mueller 13 years ago
parent 21631be2ff
commit ab7a2d43e8
  1. 9
      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());

Loading…
Cancel
Save