Skip to content

Commit 0289082

Browse files
CarlSchwanmiaulalala
authored andcommitted
chore: bump nextcloud/ocp
Fix psalm when running locally Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent d3fc918 commit 0289082

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

tests/ViewInfoCacheTest.php

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

246246
$userTrashBin = $this->createMock(Folder::class);
247247
$this->rootFolder->expects($this->once())
@@ -250,9 +250,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
250250
->willReturn($userTrashBin);
251251
if ($pathTrash === null) {
252252
$userTrashBin->expects($this->once())
253-
->method('getById')
253+
->method('getFirstNodeById')
254254
->with($fileId)
255-
->willThrowException(new NotFoundException());
255+
->willReturn(null);
256256
} else {
257257
$node = $this->createMock($isDir ? Folder::class : File::class);
258258
$node
@@ -264,9 +264,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
264264
->willReturn($pathTrash);
265265

266266
$userTrashBin->expects($this->once())
267-
->method('getById')
267+
->method('getFirstNodeById')
268268
->with($fileId)
269-
->willReturn([2 => $node]);
269+
->willReturn($node);
270270
$expected['node'] = $node;
271271
$expectedCache[$user][$fileId]['node'] = $node;
272272
}
@@ -281,9 +281,9 @@ public function testFindInfoById(string $user, int $fileId, string $filename, ?s
281281
->willReturn($path);
282282

283283
$userFolder->expects($this->once())
284-
->method('getById')
284+
->method('getFirstNodeById')
285285
->with($fileId)
286-
->willReturn([3 => $node]);
286+
->willReturn($node);
287287
$expected['node'] = $node;
288288
$expectedCache[$user][$fileId]['node'] = $node;
289289
}

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)