\OC_Group::addToGroup($user, 'group');
}
+ self::resetStorage();
+
\OC_Util::tearDownFS();
\OC::$server->getUserSession()->setUser(null);
\OC\Files\Filesystem::tearDown();
\OC_Util::setupFS($user);
}
+ /**
+ * reset init status for the share storage
+ */
+ protected static function resetStorage() {
+ $storage = new \ReflectionClass('\OC\Files\Storage\Shared');
+ $isInitialized = $storage->getProperty('isInitialized');
+ $isInitialized->setAccessible(true);
+ $isInitialized->setValue(false);
+ $isInitialized->setAccessible(false);
+ }
+
/**
* get some information from a given share
* @param int $shareID
/**
* Class Test_Files_Sharing_Updater
*/
-class Test_Files_Sharing_Updater extends OCA\Files_sharing\Tests\TestCase {
+class Test_Files_Sharing_Updater extends OCA\Files_Sharing\Tests\TestCase {
const TEST_FOLDER_NAME = '/folder_share_updater_test';