File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1313use OCP \Constants ;
1414use OCP \Files \Folder ;
1515use OCP \Files \Mount \IMountManager ;
16+ use OCP \Files \NotFoundException ;
1617use OCP \Server ;
1718use OCP \Share \IShare ;
1819
@@ -48,7 +49,11 @@ private static function moveShareInOrOutOfShare($path): void {
4849 throw new \Exception ('user folder has no owner ' );
4950 }
5051
51- $ src = $ userFolder ->get ($ path );
52+ try {
53+ $ src = $ userFolder ->get ($ path );
54+ } catch (NotFoundException ) {
55+ return ;
56+ }
5257
5358 $ shareManager = Server::get (\OCP \Share \IManager::class);
5459
Original file line number Diff line number Diff line change @@ -1565,10 +1565,15 @@ private function createTestMovableMountPoints($mountPoints) {
15651565 return new \OC \Files \Cache \Storage ($ storage , true , Server::get (IDBConnection::class));
15661566 });
15671567
1568- $ mounts [] = $ this ->getMockBuilder (TestMoveableMountPoint::class)
1569- ->onlyMethods (['moveMount ' ])
1568+ $ mount = $ this ->getMockBuilder (TestMoveableMountPoint::class)
1569+ ->onlyMethods (['moveMount ' , ' getNumericStorageId ' ])
15701570 ->setConstructorArgs ([$ storage , $ mountPoint ])
15711571 ->getMock ();
1572+
1573+ $ mount ->method ('getNumericStorageId ' )
1574+ ->willReturn (1 );
1575+
1576+ $ mounts [] = $ mount ;
15721577 }
15731578
15741579 /** @var IMountProvider|\PHPUnit\Framework\MockObject\MockObject $mountProvider */
You can’t perform that action at this time.
0 commit comments