diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-15 16:28:43 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-16 12:49:09 +0200 |
commit | 69341e4306259430533cf66fd0a76688c7c8e6ab (patch) | |
tree | 31fad47a816de299ef3a6de2bf66e6af76911133 /apps/dav/tests/unit/Connector | |
parent | 465cee2da3a0ad072de20d3fa718d5f1760b2806 (diff) | |
download | nextcloud-server-69341e4306259430533cf66fd0a76688c7c8e6ab.tar.gz nextcloud-server-69341e4306259430533cf66fd0a76688c7c8e6ab.zip |
refactor: Migrate filename validation logic from `Storage` to `FilenameValidator`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/dav/tests/unit/Connector')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/FileTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 060f0294256..d099a431184 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -570,7 +570,7 @@ class FileTest extends TestCase { ->method('getRelativePath') ->willReturnArgument(0); - $info = new \OC\Files\FileInfo('/*', $this->getMockStorage(), null, [ + $info = new \OC\Files\FileInfo("/i\nvalid", $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL, 'type' => FileInfo::TYPE_FOLDER, ], null); @@ -611,12 +611,13 @@ class FileTest extends TestCase { ->method('getRelativePath') ->willReturnArgument(0); - $info = new \OC\Files\FileInfo('/*', $this->getMockStorage(), null, [ + $info = new \OC\Files\FileInfo('/valid', $this->getMockStorage(), null, [ 'permissions' => \OCP\Constants::PERMISSION_ALL, 'type' => FileInfo::TYPE_FOLDER, ], null); $file = new \OCA\DAV\Connector\Sabre\File($view, $info); - $file->setName('/super*star.txt'); + + $file->setName("/i\nvalid"); } |