aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-09-18 12:29:29 +0200
committerRobin Appelman <robin@icewind.nl>2024-09-18 14:11:27 +0200
commit74adaebf965239ebeac947428c6d3fcf9fb50953 (patch)
tree171e1663b6d62075087144f4ccb602687ca770e4 /tests/lib
parent75cf17e4c4ce3ab6e1d5733eb5fe6e710e2f7286 (diff)
downloadnextcloud-server-74adaebf965239ebeac947428c6d3fcf9fb50953.tar.gz
nextcloud-server-74adaebf965239ebeac947428c6d3fcf9fb50953.zip
test: fix incorrect ltrim usage in test
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php
index 09402d5706a..bbeabcf0f43 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php
@@ -76,7 +76,7 @@ class ObjectStoreStorageTest extends Storage {
*/
public function testMove($source, $target): void {
$this->initSourceAndTarget($source);
- $sourceId = $this->instance->getCache()->getId(ltrim('/', $source));
+ $sourceId = $this->instance->getCache()->getId(ltrim($source, '/'));
$this->assertNotEquals(-1, $sourceId);
$this->instance->rename($source, $target);
@@ -85,7 +85,7 @@ class ObjectStoreStorageTest extends Storage {
$this->assertFalse($this->instance->file_exists($source), $source.' still exists');
$this->assertSameAsLorem($target);
- $targetId = $this->instance->getCache()->getId(ltrim('/', $target));
+ $targetId = $this->instance->getCache()->getId(ltrim($target, '/'));
$this->assertSame($sourceId, $targetId, 'fileid must be stable on move or shares will break');
}