summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-15 17:32:11 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-16 12:57:11 +0200
commit322b3946d9b67de69792b70d9250d5285fe56954 (patch)
treefe962c325774d8e01e69aa7dbecbb6c97315a6da /apps/dav/tests
parentf4ede27cdbbb4f55bb963130295a28a89a833d94 (diff)
downloadnextcloud-server-322b3946d9b67de69792b70d9250d5285fe56954.tar.gz
nextcloud-server-322b3946d9b67de69792b70d9250d5285fe56954.zip
fix(dav): Verify target path in `setName` instead of source path
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
index 3eca9b7ac1c..d2be66c13f5 100644
--- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
@@ -397,7 +397,7 @@ class DirectoryTest extends \Test\TestCase {
public function moveFailedInvalidCharsProvider() {
return [
- ['a/b', 'a/*', ['a' => true, 'a/b' => true, 'a/c*' => false], []],
+ ['a/valid', "a/i\nvalid", ['a' => true, 'a/valid' => true, 'a/c*' => false], []],
];
}
@@ -463,7 +463,7 @@ class DirectoryTest extends \Test\TestCase {
$sourceNode = new Directory($view, $sourceInfo);
$targetNode = $this->getMockBuilder(Directory::class)
- ->setMethods(['childExists'])
+ ->onlyMethods(['childExists'])
->setConstructorArgs([$view, $targetInfo])
->getMock();
$targetNode->expects($this->once())->method('childExists')