diff options
author | Robin Appelman <robin@icewind.nl> | 2023-11-08 22:14:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 22:14:19 +0100 |
commit | b29bc59e8b4a0683b6e6af289fbeffad332cfcc5 (patch) | |
tree | 8d59b876e7d86b6e223bc210049360474517c9ab /tests | |
parent | 1acc7c04684a05f024f4c83a8665d4732c2fc5f6 (diff) | |
parent | f4fa2fb93cd230a69ae6d6aad6b293b3a576eae7 (diff) | |
download | nextcloud-server-b29bc59e8b4a0683b6e6af289fbeffad332cfcc5.tar.gz nextcloud-server-b29bc59e8b4a0683b6e6af289fbeffad332cfcc5.zip |
Merge pull request #41119 from nextcloud/optmize-storage-wrappers
optimize builtin storage wrappers
Diffstat (limited to 'tests')
-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()); } } |