public function setUp() { \OC_User::createUser(self::TEST_USER1, self::TEST_USER1); \OC_User::createUser(self::TEST_USER2, self::TEST_USER2); \OC_Group::createGroup(self::TEST_GROUP1); \OC_Group::createGroup(self::TEST_GROUP1B); \OC_Group::addToGroup(self::TEST_USER1, self::TEST_GROUP1); \OC_Group::addToGroup(self::TEST_USER1, self::TEST_GROUP1B); \OC_Group::createGroup(self::TEST_GROUP2); \OC_Group::createGroup(self::TEST_GROUP2B); \OC_Group::addToGroup(self::TEST_USER2, self::TEST_GROUP2); \OC_Group::addToGroup(self::TEST_USER2, self::TEST_GROUP2B); \OC_User::setUserId(self::TEST_USER1); $this->userHome = \OC_User::getHome(self::TEST_USER1); @mkdir($this->userHome); $this->dataDir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/'); $this->oldAllowedBackends = OCP\Config::getAppValue('files_external', 'user_mounting_backends', ''); $this->allBackends = OC_Mount_Config::getBackends(); OCP\Config::setAppValue('files_external', 'user_mounting_backends', implode(',', array_keys($this->allBackends))); OC_Mount_Config::$skipTest = true; Test_Mount_Config_Hook_Test::setupHooks(); }
protected function setUp() { parent::setUp(); OC_Mount_Config::registerBackend('Test_Mount_Config_Dummy_Storage', array('backend' => 'dummy', 'priority' => 150, 'configuration' => array())); OC_Mount_Config::registerBackend('Test_Mount_Config_Storage_No_Personal', array('backend' => 'dummy no personal', 'priority' => 150, 'configuration' => array())); \OC_User::createUser(self::TEST_USER1, self::TEST_USER1); \OC_User::createUser(self::TEST_USER2, self::TEST_USER2); \OC_Group::createGroup(self::TEST_GROUP1); \OC_Group::createGroup(self::TEST_GROUP1B); \OC_Group::addToGroup(self::TEST_USER1, self::TEST_GROUP1); \OC_Group::addToGroup(self::TEST_USER1, self::TEST_GROUP1B); \OC_Group::createGroup(self::TEST_GROUP2); \OC_Group::createGroup(self::TEST_GROUP2B); \OC_Group::addToGroup(self::TEST_USER2, self::TEST_GROUP2); \OC_Group::addToGroup(self::TEST_USER2, self::TEST_GROUP2B); \OC_User::setUserId(self::TEST_USER1); $this->userHome = \OC_User::getHome(self::TEST_USER1); @mkdir($this->userHome); $this->dataDir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data/'); $this->oldAllowedBackends = OCP\Config::getAppValue('files_external', 'user_mounting_backends', ''); OCP\Config::setAppValue('files_external', 'user_mounting_backends', 'Test_Mount_Config_Dummy_Storage'); OC_Mount_Config::$skipTest = true; Test_Mount_Config_Hook_Test::setupHooks(); }