function setUp() { // reset backend \OC_User::useBackend('database'); // set user id \OC_User::setUserId(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1); $this->userId = \Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1; $this->pass = \Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1; // init filesystem view $this->view = new \OC\Files\View('/'); list($this->storage, $intPath) = $this->view->resolvePath('/'); // init short data $this->dataShort = 'hats'; // remember files_trashbin state $this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin'); // we don't want to tests with app files_trashbin enabled \OC_App::disable('files_trashbin'); // create test user \Test_Encryption_Util::loginHelper(\Test_Encryption_Webdav::TEST_ENCRYPTION_WEBDAV_USER1); }