aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/node
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-12 15:54:41 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-17 10:48:19 +0100
commit6625d5c88f74edade459ec7e2ee0bfb79f21fedd (patch)
treec615a82f5838b8ebded306c4c474751d2f2e782a /tests/lib/files/node
parent289a27778e78bb69830b5b05f4084627a781157b (diff)
downloadnextcloud-server-6625d5c88f74edade459ec7e2ee0bfb79f21fedd.tar.gz
nextcloud-server-6625d5c88f74edade459ec7e2ee0bfb79f21fedd.zip
Correctly restore previous root mount point after testing
Diffstat (limited to 'tests/lib/files/node')
-rw-r--r--tests/lib/files/node/integration.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/lib/files/node/integration.php b/tests/lib/files/node/integration.php
index 319f2f9f5f7..cde2eb22b7b 100644
--- a/tests/lib/files/node/integration.php
+++ b/tests/lib/files/node/integration.php
@@ -20,6 +20,9 @@ class IntegrationTests extends \PHPUnit_Framework_TestCase {
*/
private $root;
+ /** @var \OC\Files\Storage\Storage */
+ private $originalStorage;
+
/**
* @var \OC\Files\Storage\Storage[]
*/
@@ -30,7 +33,10 @@ class IntegrationTests extends \PHPUnit_Framework_TestCase {
*/
private $view;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
+ $this->originalStorage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::init('', '');
\OC\Files\Filesystem::clearMounts();
$manager = \OC\Files\Filesystem::getMountManager();
@@ -54,11 +60,15 @@ class IntegrationTests extends \PHPUnit_Framework_TestCase {
$this->root->mount($subStorage, '/substorage/');
}
- public function tearDown() {
+ protected function tearDown() {
foreach ($this->storages as $storage) {
$storage->getCache()->clear();
}
\OC\Files\Filesystem::clearMounts();
+
+ \OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
+
+ parent::tearDown();
}
public function testBasicFile() {