@@ -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 }
0 commit comments