@@ -120,15 +120,25 @@ protected function setUp(): void {
120120 \OC ::$ server ->getAppManager ()->enableApp ('files_trashbin ' );
121121 $ config = \OC ::$ server ->getConfig ();
122122 $ mockConfig = $ this ->createMock (\OCP \IConfig::class);
123- $ mockConfig-> expects ( $ this -> any ())
123+ $ mockConfig
124124 ->method ('getSystemValue ' )
125- ->will ($ this ->returnCallback (function ($ key , $ default ) use ($ config ) {
125+ ->will ($ this ->returnCallback (static function ($ key , $ default ) use ($ config ) {
126126 if ($ key === 'filesystem_check_changes ' ) {
127127 return \OC \Files \Cache \Watcher::CHECK_ONCE ;
128128 } else {
129129 return $ config ->getSystemValue ($ key , $ default );
130130 }
131131 }));
132+ $ mockConfig
133+ ->method ('getUserValue ' )
134+ ->willReturnCallback (static function ($ userId , $ appName , $ key , $ default = '' ) use ($ config ) {
135+ return $ config ->getUserValue ($ userId , $ appName , $ key , $ default );
136+ });
137+ $ mockConfig
138+ ->method ('getAppValue ' )
139+ ->willReturnCallback (static function ($ appName , $ key , $ default = '' ) use ($ config ) {
140+ return $ config ->getAppValue ($ appName , $ key , $ default );
141+ });
132142 $ this ->overwriteService ('AllConfig ' , $ mockConfig );
133143
134144 $ this ->trashRoot1 = '/ ' . self ::TEST_TRASHBIN_USER1 . '/files_trashbin ' ;
0 commit comments