test: fix incorrect ltrim usage in test

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/48213/head
Robin Appelman 2024-09-18 12:29:29 +07:00 committed by Louis
parent 78637be4cd
commit f1df40f718
1 changed files with 2 additions and 2 deletions

@ -89,7 +89,7 @@ class ObjectStoreStorageTest extends Storage {
*/
public function testMove($source, $target) {
$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);
@ -98,7 +98,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');
}