chore(files_versions): Only mock getSystemValue method to avoid problems in files_versions tests

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/48560/head
Côme Chilliet 2024-11-26 14:54:42 +07:00 committed by Côme Chilliet
parent e35a8ed063
commit 14872c8040
1 changed files with 4 additions and 1 deletions

@ -83,7 +83,10 @@ class VersioningTest extends \Test\TestCase {
parent::setUp();
$config = Server::get(IConfig::class);
$mockConfig = $this->createMock(IConfig::class);
$mockConfig = $this->getMockBuilder(AllConfig::class)
->onlyMethods(['getSystemValue'])
->setConstructorArgs([Server::get(\OC\SystemConfig::class)])
->getMock();
$mockConfig->expects($this->any())
->method('getSystemValue')
->willReturnCallback(function ($key, $default) use ($config) {