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.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php
index f7964feeae8..91f0bb9b01d 100644
--- a/tests/lib/Files/FilesystemTest.php
+++ b/tests/lib/Files/FilesystemTest.php
@@ -80,7 +80,7 @@ class FilesystemTest extends \Test\TestCase {
parent::tearDown();
}
- public function testMount() {
+ public function testMount(): void {
\OC\Files\Filesystem::mount('\OC\Files\Storage\Local', self::getStorageData(), '/');
$this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/'));
$this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/some/folder'));
@@ -195,7 +195,7 @@ class FilesystemTest extends \Test\TestCase {
/**
* @dataProvider normalizePathData
*/
- public function testNormalizePath($expected, $path, $stripTrailingSlash = true) {
+ public function testNormalizePath($expected, $path, $stripTrailingSlash = true): void {
$this->assertEquals($expected, \OC\Files\Filesystem::normalizePath($path, $stripTrailingSlash));
}
@@ -213,11 +213,11 @@ class FilesystemTest extends \Test\TestCase {
/**
* @dataProvider normalizePathKeepUnicodeData
*/
- public function testNormalizePathKeepUnicode($expected, $path, $keepUnicode = false) {
+ public function testNormalizePathKeepUnicode($expected, $path, $keepUnicode = false): void {
$this->assertEquals($expected, \OC\Files\Filesystem::normalizePath($path, true, false, $keepUnicode));
}
- public function testNormalizePathKeepUnicodeCache() {
+ public function testNormalizePathKeepUnicodeCache(): void {
$nfdName = 'ümlaut';
$nfcName = 'ümlaut';
// call in succession due to cache
@@ -254,7 +254,7 @@ class FilesystemTest extends \Test\TestCase {
/**
* @dataProvider isValidPathData
*/
- public function testIsValidPath($path, $expected) {
+ public function testIsValidPath($path, $expected): void {
$this->assertSame($expected, \OC\Files\Filesystem::isValidPath($path));
}
@@ -276,11 +276,11 @@ class FilesystemTest extends \Test\TestCase {
/**
* @dataProvider isFileBlacklistedData
*/
- public function testIsFileBlacklisted($path, $expected) {
+ public function testIsFileBlacklisted($path, $expected): void {
$this->assertSame($expected, \OC\Files\Filesystem::isFileBlacklisted($path));
}
- public function testNormalizePathUTF8() {
+ public function testNormalizePathUTF8(): void {
if (!class_exists('Patchwork\PHP\Shim\Normalizer')) {
$this->markTestSkipped('UTF8 normalizer Patchwork was not found');
}
@@ -289,7 +289,7 @@ class FilesystemTest extends \Test\TestCase {
$this->assertEquals("/foo/bar\xC3\xBC", \OC\Files\Filesystem::normalizePath("\\foo\\baru\xCC\x88"));
}
- public function testHooks() {
+ public function testHooks(): void {
if (\OC\Files\Filesystem::getView()) {
$user = \OC_User::getUser();
} else {
@@ -324,7 +324,7 @@ class FilesystemTest extends \Test\TestCase {
* Tests that an exception is thrown when passed user does not exist.
*
*/
- public function testLocalMountWhenUserDoesNotExist() {
+ public function testLocalMountWhenUserDoesNotExist(): void {
$this->expectException(\OC\User\NoUserException::class);
$userId = $this->getUniqueID('user_');
@@ -333,13 +333,13 @@ class FilesystemTest extends \Test\TestCase {
}
- public function testNullUserThrows() {
+ public function testNullUserThrows(): void {
$this->expectException(\OC\User\NoUserException::class);
\OC\Files\Filesystem::initMountPoints(null);
}
- public function testNullUserThrowsTwice() {
+ public function testNullUserThrowsTwice(): void {
$thrown = 0;
try {
\OC\Files\Filesystem::initMountPoints(null);
@@ -357,7 +357,7 @@ class FilesystemTest extends \Test\TestCase {
/**
* Tests that an exception is thrown when passed user does not exist.
*/
- public function testLocalMountWhenUserDoesNotExistTwice() {
+ public function testLocalMountWhenUserDoesNotExistTwice(): void {
$thrown = 0;
$userId = $this->getUniqueID('user_');
@@ -379,7 +379,7 @@ class FilesystemTest extends \Test\TestCase {
/**
* Tests that the home storage is used for the user's mount point
*/
- public function testHomeMount() {
+ public function testHomeMount(): void {
$userId = $this->getUniqueID('user_');
\OC::$server->getUserManager()->createUser($userId, $userId);
@@ -409,7 +409,7 @@ class FilesystemTest extends \Test\TestCase {
/**
* Test that the default cache dir is part of the user's home
*/
- public function testMountDefaultCacheDir() {
+ public function testMountDefaultCacheDir(): void {
$userId = $this->getUniqueID('user_');
$config = \OC::$server->getConfig();
$oldCachePath = $config->getSystemValueString('cache_path', '');
@@ -438,7 +438,7 @@ class FilesystemTest extends \Test\TestCase {
* Test that an external cache is mounted into
* the user's home
*/
- public function testMountExternalCacheDir() {
+ public function testMountExternalCacheDir(): void {
$userId = $this->getUniqueID('user_');
$config = \OC::$server->getConfig();
@@ -465,7 +465,7 @@ class FilesystemTest extends \Test\TestCase {
$config->setSystemValue('cache_path', $oldCachePath);
}
- public function testRegisterMountProviderAfterSetup() {
+ public function testRegisterMountProviderAfterSetup(): void {
\OC\Files\Filesystem::initMountPoints(self::TEST_FILESYSTEM_USER2);
$this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/foo/bar'));
$mount = new MountPoint(new Temporary([]), '/foo/bar');