2525use OCP \IDBConnection ;
2626use OCP \Lock \ILockingProvider ;
2727use OCP \Lock \LockedException ;
28+ use OCP \Share \IManager as IShareManager ;
2829use OCP \Share \IShare ;
2930use OCP \Util ;
3031use Test \HookHelper ;
@@ -296,7 +297,7 @@ public function sharingDisabledPermissionProvider() {
296297 */
297298 public function testRemoveSharePermissionWhenSharingDisabledForUser ($ excludeGroups , $ excludeGroupsList , $ expectedShareable ) {
298299 // Reset sharing disabled for users cache
299- self ::invokePrivate (\OC ::$ server ->getShareManager ( ), 'sharingDisabledForUsersCache ' , [new CappedMemoryCache ()]);
300+ self ::invokePrivate (\OC ::$ server ->get (IShareManager::class ), 'sharingDisabledForUsersCache ' , [new CappedMemoryCache ()]);
300301
301302 $ config = \OC ::$ server ->getConfig ();
302303 $ oldExcludeGroupsFlag = $ config ->getAppValue ('core ' , 'shareapi_exclude_groups ' , 'no ' );
@@ -321,7 +322,7 @@ public function testRemoveSharePermissionWhenSharingDisabledForUser($excludeGrou
321322 $ config ->setAppValue ('core ' , 'shareapi_exclude_groups_list ' , $ oldExcludeGroupsList );
322323
323324 // Reset sharing disabled for users cache
324- self ::invokePrivate (\OC ::$ server ->getShareManager ( ), 'sharingDisabledForUsersCache ' , [new CappedMemoryCache ()]);
325+ self ::invokePrivate (\OC ::$ server ->get (IShareManager::class ), 'sharingDisabledForUsersCache ' , [new CappedMemoryCache ()]);
325326 }
326327
327328 public function testCacheIncompleteFolder () {
@@ -1683,7 +1684,7 @@ public function testMoveMountPointIntoSharedFolder() {
16831684
16841685 $ userFolder = \OC ::$ server ->getUserFolder ($ this ->user );
16851686 $ shareDir = $ userFolder ->get ('shareddir ' );
1686- $ shareManager = \OC ::$ server ->getShareManager ( );
1687+ $ shareManager = \OC ::$ server ->get (IShareManager::class );
16871688 $ share = $ shareManager ->newShare ();
16881689 $ share ->setSharedWith ('test2 ' )
16891690 ->setSharedBy ($ this ->user )
0 commit comments