Browse Source

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

Remove broken function resetStorage from test cases
pull/33702/head
Vincent Petry 3 years ago
committed by GitHub
parent
commit
696a48ae97
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      apps/federatedfilesharing/tests/TestCase.php
  2. 13
      apps/files_sharing/tests/TestCase.php

13
apps/federatedfilesharing/tests/TestCase.php

@ -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);
}
}

13
apps/files_sharing/tests/TestCase.php

@ -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

Loading…
Cancel
Save