summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/tests/ajax_rename.php11
-rw-r--r--apps/files_trashbin/tests/storage.php8
2 files changed, 2 insertions, 17 deletions
diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php
index 789177bb353..34e7f5085dd 100644
--- a/apps/files/tests/ajax_rename.php
+++ b/apps/files/tests/ajax_rename.php
@@ -38,21 +38,15 @@ class Test_OC_Files_App_Rename extends \Test\TestCase {
*/
private $files;
- private $originalStorage;
-
protected function setUp() {
parent::setUp();
- $this->originalStorage = \OC\Files\Filesystem::getStorage('/');
-
// mock OC_L10n
if (!self::$user) {
self::$user = uniqid();
}
\OC_User::createUser(self::$user, 'password');
- \OC_User::setUserId(self::$user);
-
- \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
+ $this->loginAsUser(self::$user);
$l10nMock = $this->getMock('\OC_L10N', array('t'), array(), '', false);
$l10nMock->expects($this->any())
@@ -72,9 +66,8 @@ class Test_OC_Files_App_Rename extends \Test\TestCase {
protected function tearDown() {
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
- \OC\Files\Filesystem::tearDown();
- \OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
+ $this->logout();
parent::tearDown();
}
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();