<?php
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test;
/**
* Tests for server check functions
*
* @group DB
*/
class UtilCheckServerTest extends \Test\TestCase {
private $datadir;
/**
* @param array $systemOptions
* @return \OC\SystemConfig | \PHPUnit\Framework\MockObject\MockObject
*/
protected function getConfig($systemOptions) {
$systemOptions['datadirectory'] = $this->datadir;
$systemOptions['appstoreenabled'] = false; //it's likely that there is no app folder we can write in
$config = $this->getMockBuilder('\OC\SystemConfig')
->disableOriginalConstructor()
->getMock();
$config->expects($this->any())
->method('getValue')
->willReturnCallback(function ($key, $default) use ($systemOptions)