예제 #1
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $appManager = \OC::$server->getAppManager();
     self::$trashBinStatus = $appManager->isEnabledForUser('files_trashbin');
     // reset backend
     \OC_User::clearBackends();
     \OC_User::useBackend('database');
     // clear share hooks
     \OC_Hook::clear('OCP\\Share');
     \OC::registerShareHooks();
     $application = new \OCA\Files_Sharing\AppInfo\Application();
     $application->registerMountProviders();
     $application->setupPropagation();
     //disable encryption
     \OC_App::disable('encryption');
     //configure trashbin
     self::$rememberRetentionObligation = \OC_Config::getValue('trashbin_retention_obligation', Files_Trashbin\Trashbin::DEFAULT_RETENTION_OBLIGATION);
     \OC_Config::setValue('trashbin_retention_obligation', 2);
     self::$rememberAutoExpire = \OC_Config::getValue('trashbin_auto_expire', true);
     \OC_Config::setValue('trashbin_auto_expire', true);
     // register hooks
     Files_Trashbin\Trashbin::registerHooks();
     // create test user
     self::loginHelper(self::TEST_TRASHBIN_USER2, true);
     self::loginHelper(self::TEST_TRASHBIN_USER1, true);
 }
예제 #2
0
파일: versions.php 프로젝트: nem0xff/core
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $application = new \OCA\Files_Sharing\AppInfo\Application();
     $application->registerMountProviders();
     $application->setupPropagation();
     // create test user
     self::loginHelper(self::TEST_VERSIONS_USER2, true);
     self::loginHelper(self::TEST_VERSIONS_USER, true);
 }
예제 #3
0
파일: etagtest.php 프로젝트: 0x17de/core
 protected function setUp()
 {
     parent::setUp();
     \OC_Hook::clear('OC_Filesystem', 'setup');
     $application = new \OCA\Files_Sharing\AppInfo\Application();
     $application->registerMountProviders();
     $application->setupPropagation();
     \OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
     \OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
     $this->datadir = \OC_Config::getValue('datadirectory');
     $this->tmpDir = \OC_Helper::tmpFolder();
     \OC_Config::setValue('datadirectory', $this->tmpDir);
     $this->userBackend = new \Test\Util\User\Dummy();
     \OC_User::useBackend($this->userBackend);
 }