Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-04-08 13:03:55 +0300
committerVincent Petry <pvince81@owncloud.com>2015-04-08 13:45:38 +0300
commitf8cfc03f36e438f1874e9840ce69811112e15475 (patch)
tree4b09a8e57c2c1492ee023e2adf9efa2a9acc709e /apps/files_trashbin/tests/storage.php
parent6c327f8331617652ef0b268d51edc6a23624e33c (diff)
Replace originalStorage in tests with a proper teardown
The purpose of $originalStorage in unit tests was to remount the old root. However that storage itself is already wrapped by storage wrapper, so remounting it would rewrap the storage several times. This fix makes use of "loginAsUser()" and "logout()" from the TestCase class to properly initialize and cleanup the FS as expected.
Diffstat (limited to 'apps/files_trashbin/tests/storage.php')
-rw-r--r--apps/files_trashbin/tests/storage.php8
1 files changed, 0 insertions, 8 deletions
diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/storage.php
index f1ac055d335..d5bd7c318d3 100644
--- a/apps/files_trashbin/tests/storage.php
+++ b/apps/files_trashbin/tests/storage.php
@@ -35,11 +35,6 @@ class Storage extends \Test\TestCase {
private $user;
/**
- * @var \OC\Files\Storage\Storage
- **/
- private $originalStorage;
-
- /**
* @var \OC\Files\View
*/
private $rootView;
@@ -61,8 +56,6 @@ class Storage extends \Test\TestCase {
// this will setup the FS
$this->loginAsUser($this->user);
- $this->originalStorage = \OC\Files\Filesystem::getStorage('/');
-
\OCA\Files_Trashbin\Storage::setupStorage();
$this->rootView = new \OC\Files\View('/');
@@ -73,7 +66,6 @@ class Storage extends \Test\TestCase {
protected function tearDown() {
\OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
- \OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
$this->logout();
\OC_User::deleteUser($this->user);
\OC_Hook::clear();