summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
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 /apps/files/tests
parent289a27778e78bb69830b5b05f4084627a781157b (diff)
downloadnextcloud-server-6625d5c88f74edade459ec7e2ee0bfb79f21fedd.tar.gz
nextcloud-server-6625d5c88f74edade459ec7e2ee0bfb79f21fedd.zip
Correctly restore previous root mount point after testing
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/ajax_rename.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php
index 5ed8b1931f4..3bccaca1231 100644
--- a/apps/files/tests/ajax_rename.php
+++ b/apps/files/tests/ajax_rename.php
@@ -34,7 +34,14 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase {
*/
private $files;
- function setUp() {
+ /** @var \OC\Files\Storage\Storage */
+ private $originalStorage;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->originalStorage = \OC\Files\Filesystem::getStorage('/');
+
// mock OC_L10n
if (!self::$user) {
self::$user = uniqid();
@@ -59,10 +66,13 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase {
$this->files = new \OCA\Files\App($viewMock, $l10nMock);
}
- function tearDown() {
+ protected function tearDown() {
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
\OC\Files\Filesystem::tearDown();
+ \OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
+
+ parent::tearDown();
}
/**