diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-16 14:21:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 14:21:56 +0100 |
commit | 1af4301997c4d4979a9a43acb5450a436f672eb2 (patch) | |
tree | 63a6171472e6ba8e29001e9d383d697faf695162 /tests/lib | |
parent | 8a7a89f42cc2a92c8041e83512eac1e25ef8ff55 (diff) | |
parent | 81d625d44d2b177b58b095da21ce100057a1755b (diff) | |
download | nextcloud-server-1af4301997c4d4979a9a43acb5450a436f672eb2.tar.gz nextcloud-server-1af4301997c4d4979a9a43acb5450a436f672eb2.zip |
Merge pull request #41363 from nextcloud/optmize-storage-wrappers-27
[27] optimize builtin storage wrappers
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Files/FileInfoTest.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/lib/Files/FileInfoTest.php b/tests/lib/Files/FileInfoTest.php index fd2b506beb9..98f51aed67d 100644 --- a/tests/lib/Files/FileInfoTest.php +++ b/tests/lib/Files/FileInfoTest.php @@ -9,6 +9,8 @@ namespace Test\Files; use OC\Files\FileInfo; +use OC\Files\Mount\HomeMountPoint; +use OC\Files\Mount\MountPoint; use OC\Files\Storage\Home; use OC\Files\Storage\Temporary; use OCP\IConfig; @@ -33,19 +35,27 @@ class FileInfoTest extends TestCase { ->willReturn('foo'); $user->method('getHome') ->willReturn('foo'); + $storage = new Home(['user' => $user]); $fileInfo = new FileInfo( '', - new Home(['user' => $user]), - '', [], null); + $storage, + '', + [], + new HomeMountPoint($user, $storage, '/foo/files') + ); $this->assertFalse($fileInfo->isMounted()); } public function testIsMountedNonHomeStorage() { + $storage = new Temporary(); $fileInfo = new FileInfo( '', - new Temporary(), - '', [], null); + $storage, + '', + [], + new MountPoint($storage, '/foo/files/bar') + ); $this->assertTrue($fileInfo->isMounted()); } } |