aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/FilesystemTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/FilesystemTest.php')
-rw-r--r--tests/lib/Files/FilesystemTest.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php
index 39545b542e7..9fc3032fa28 100644
--- a/tests/lib/Files/FilesystemTest.php
+++ b/tests/lib/Files/FilesystemTest.php
@@ -59,7 +59,6 @@ class DummyMountProvider implements IMountProvider {
* @package Test\Files
*/
class FilesystemTest extends \Test\TestCase {
-
const TEST_FILESYSTEM_USER1 = "test-filesystem-user1";
const TEST_FILESYSTEM_USER2 = "test-filesystem-user1";
@@ -299,7 +298,6 @@ class FilesystemTest extends \Test\TestCase {
$userObj = \OC::$server->getUserManager()->get($user);
\OC::$server->getUserSession()->setUser($userObj);
\OC\Files\Filesystem::init($user, '/' . $user . '/files');
-
}
\OC_Hook::clear('OC_Filesystem');
\OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook');
@@ -391,12 +389,14 @@ class FilesystemTest extends \Test\TestCase {
$this->assertTrue($homeMount->instanceOfStorage('\OCP\Files\IHomeStorage'));
if ($homeMount->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')) {
$this->assertEquals('object::user:' . $userId, $homeMount->getId());
- } else if ($homeMount->instanceOfStorage('\OC\Files\Storage\Home')) {
+ } elseif ($homeMount->instanceOfStorage('\OC\Files\Storage\Home')) {
$this->assertEquals('home::' . $userId, $homeMount->getId());
}
$user = \OC::$server->getUserManager()->get($userId);
- if ($user !== null) { $user->delete(); }
+ if ($user !== null) {
+ $user->delete();
+ }
}
public function dummyHook($arguments) {
@@ -425,7 +425,9 @@ class FilesystemTest extends \Test\TestCase {
$this->assertTrue($storage->instanceOfStorage('\OCP\Files\IHomeStorage'));
$this->assertEquals('cache', $internalPath);
$user = \OC::$server->getUserManager()->get($userId);
- if ($user !== null) { $user->delete(); }
+ if ($user !== null) {
+ $user->delete();
+ }
$config->setSystemValue('cache_path', $oldCachePath);
}
@@ -454,7 +456,9 @@ class FilesystemTest extends \Test\TestCase {
$this->assertTrue($storage->instanceOfStorage('\OC\Files\Storage\Local'));
$this->assertEquals('', $internalPath);
$user = \OC::$server->getUserManager()->get($userId);
- if ($user !== null) { $user->delete(); }
+ if ($user !== null) {
+ $user->delete();
+ }
$config->setSystemValue('cache_path', $oldCachePath);
}