diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-05-14 19:25:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-14 19:25:51 +0200 |
commit | 2cd491f491a658ad906a1a4602f64a4abe9a25bb (patch) | |
tree | e42ac00a3b80197579f4c4ada6ac083c458eb5f8 /apps/files_trashbin/tests | |
parent | 42f45030ff282504d7c6d6321e46ce118d5e4087 (diff) | |
parent | 43418eea5f627e1dee61f37c43a47fd00bfba376 (diff) | |
download | nextcloud-server-2cd491f491a658ad906a1a4602f64a4abe9a25bb.tar.gz nextcloud-server-2cd491f491a658ad906a1a4602f64a4abe9a25bb.zip |
Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooks
feat(encryption): Migrate from hooks to events
Diffstat (limited to 'apps/files_trashbin/tests')
-rw-r--r-- | apps/files_trashbin/tests/TrashbinTest.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 823d69d02c5..42054fc48a6 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -116,8 +116,11 @@ class TrashbinTest extends \Test\TestCase { Server::get(IAppManager::class)->enableApp('files_trashbin'); $config = Server::get(IConfig::class); - $mockConfig = $this->createMock(IConfig::class); - $mockConfig + $mockConfig = $this->getMockBuilder(AllConfig::class) + ->onlyMethods(['getSystemValue']) + ->setConstructorArgs([Server::get(\OC\SystemConfig::class)]) + ->getMock(); + $mockConfig->expects($this->any()) ->method('getSystemValue') ->willReturnCallback(static function ($key, $default) use ($config) { if ($key === 'filesystem_check_changes') { @@ -126,16 +129,6 @@ class TrashbinTest extends \Test\TestCase { return $config->getSystemValue($key, $default); } }); - $mockConfig - ->method('getUserValue') - ->willReturnCallback(static function ($userId, $appName, $key, $default = '') use ($config) { - return $config->getUserValue($userId, $appName, $key, $default); - }); - $mockConfig - ->method('getAppValue') - ->willReturnCallback(static function ($appName, $key, $default = '') use ($config) { - return $config->getAppValue($appName, $key, $default); - }); $this->overwriteService(AllConfig::class, $mockConfig); $this->trashRoot1 = '/' . self::TEST_TRASHBIN_USER1 . '/files_trashbin'; |