@@ -613,6 +613,7 @@ public function dataGeneralChecks() {
613613 $ limitedPermssions = $ this ->createMock (File::class);
614614 $ limitedPermssions ->method ('isShareable ' )->willReturn (true );
615615 $ limitedPermssions ->method ('getPermissions ' )->willReturn (\OCP \Constants::PERMISSION_READ );
616+ $ limitedPermssions ->method ('getId ' )->willReturn (108 );
616617 $ limitedPermssions ->method ('getPath ' )->willReturn ('path ' );
617618 $ limitedPermssions ->method ('getOwner ' )
618619 ->willReturn ($ owner );
@@ -634,6 +635,7 @@ public function dataGeneralChecks() {
634635 $ nonMoveableMountPermssions = $ this ->createMock (Folder::class);
635636 $ nonMoveableMountPermssions ->method ('isShareable ' )->willReturn (true );
636637 $ nonMoveableMountPermssions ->method ('getPermissions ' )->willReturn (\OCP \Constants::PERMISSION_READ );
638+ $ nonMoveableMountPermssions ->method ('getId ' )->willReturn (108 );
637639 $ nonMoveableMountPermssions ->method ('getPath ' )->willReturn ('path ' );
638640 $ nonMoveableMountPermssions ->method ('getOwner ' )
639641 ->willReturn ($ owner );
@@ -655,6 +657,7 @@ public function dataGeneralChecks() {
655657 $ allPermssions = $ this ->createMock (Folder::class);
656658 $ allPermssions ->method ('isShareable ' )->willReturn (true );
657659 $ allPermssions ->method ('getPermissions ' )->willReturn (\OCP \Constants::PERMISSION_ALL );
660+ $ allPermssions ->method ('getId ' )->willReturn (108 );
658661 $ allPermssions ->method ('getOwner ' )
659662 ->willReturn ($ owner );
660663 $ allPermssions ->method ('getStorage ' )
@@ -675,6 +678,7 @@ public function dataGeneralChecks() {
675678 $ remoteFile = $ this ->createMock (Folder::class);
676679 $ remoteFile ->method ('isShareable ' )->willReturn (true );
677680 $ remoteFile ->method ('getPermissions ' )->willReturn (\OCP \Constants::PERMISSION_READ ^ \OCP \Constants::PERMISSION_UPDATE );
681+ $ remoteFile ->method ('getId ' )->willReturn (108 );
678682 $ remoteFile ->method ('getOwner ' )
679683 ->willReturn ($ owner );
680684 $ remoteFile ->method ('getStorage ' )
@@ -709,6 +713,11 @@ public function testGeneralChecks($share, $exceptionMessage, $exception) {
709713 $ userFolder ->expects ($ this ->any ())
710714 ->method ('getId ' )
711715 ->willReturn (42 );
716+ // Id 108 is used in the data to refer to the node of the share.
717+ $ userFolder ->expects ($ this ->any ())
718+ ->method ('getById ' )
719+ ->with (108 )
720+ ->willReturn ([$ share ->getNode ()]);
712721 $ userFolder ->expects ($ this ->any ())
713722 ->method ('getRelativePath ' )
714723 ->willReturnArgument (0 );
0 commit comments