Merge pull request #33430 from nextcloud/fix/remove-broken-resetstorage

Remove broken function resetStorage from test cases
This commit is contained in:
Vincent Petry 2022-08-25 17:05:45 +02:00 committed by GitHub
commit 696a48ae97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 26 deletions

View file

@ -106,8 +106,6 @@ abstract class TestCase extends \Test\TestCase {
}
}
self::resetStorage();
\OC_Util::tearDownFS();
\OC::$server->getUserSession()->setUser(null);
\OC\Files\Filesystem::tearDown();
@ -116,15 +114,4 @@ abstract class TestCase extends \Test\TestCase {
\OC_Util::setupFS($user);
}
/**
* reset init status for the share storage
*/
protected static function resetStorage() {
$storage = new \ReflectionClass('\OCA\Files_Sharing\SharedStorage');
$isInitialized = $storage->getProperty('initialized');
$isInitialized->setAccessible(true);
$isInitialized->setValue($storage, false);
$isInitialized->setAccessible(false);
}
}

View file

@ -201,8 +201,6 @@ abstract class TestCase extends \Test\TestCase {
}
}
self::resetStorage();
\OC_Util::tearDownFS();
\OC\Files\Cache\Storage::getGlobalCache()->clearCache();
\OC::$server->getUserSession()->setUser(null);
@ -213,17 +211,6 @@ abstract class TestCase extends \Test\TestCase {
\OC_Util::setupFS($user);
}
/**
* reset init status for the share storage
*/
protected static function resetStorage() {
$storage = new \ReflectionClass('\OCA\Files_Sharing\SharedStorage');
$isInitialized = $storage->getProperty('initialized');
$isInitialized->setAccessible(true);
$isInitialized->setValue($storage, false);
$isInitialized->setAccessible(false);
}
/**
* get some information from a given share
* @param int $shareID