Skip to content

Commit f55f5ad

Browse files
committed
chore: bump nextcloud/ocp
Fix psalm when running locally Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 47a796b commit f55f5ad

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

tests/ViewInfoCacheTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
238238
->willReturn($userFolder);
239239
if ($path === null) {
240240
$userFolder->expects($this->once())
241-
->method('getById')
241+
->method('getFirstNodeById')
242242
->with($fileId)
243-
->willThrowException(new NotFoundException());
243+
->willReturn(null);
244244

245245
$userTrashBin = $this->createMock(Folder::class);
246246
$this->rootFolder->expects($this->once())
@@ -249,9 +249,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
249249
->willReturn($userTrashBin);
250250
if ($pathTrash === null) {
251251
$userTrashBin->expects($this->once())
252-
->method('getById')
252+
->method('getFirstNodeById')
253253
->with($fileId)
254-
->willThrowException(new NotFoundException());
254+
->willReturn(null);
255255
} else {
256256
$node = $this->createMock($isDir ? Folder::class : File::class);
257257
$node
@@ -263,9 +263,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
263263
->willReturn($pathTrash);
264264

265265
$userTrashBin->expects($this->once())
266-
->method('getById')
266+
->method('getFirstNodeById')
267267
->with($fileId)
268-
->willReturn([2 => $node]);
268+
->willReturn($node);
269269
$expected['node'] = $node;
270270
$expectedCache[$user][$fileId]['node'] = $node;
271271
}
@@ -280,9 +280,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
280280
->willReturn($path);
281281

282282
$userFolder->expects($this->once())
283-
->method('getById')
283+
->method('getFirstNodeById')
284284
->with($fileId)
285-
->willReturn([3 => $node]);
285+
->willReturn($node);
286286
$expected['node'] = $node;
287287
$expectedCache[$user][$fileId]['node'] = $node;
288288
}

vendor-bin/psalm/composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)