use OCP\AppFramework\Http\RedirectResponse;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
-use OCP\IDateTimeFormatter;
use OCP\IL10N;
use OCP\IRequest;
use OCP\ITempManager;
private $logger;
/** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
private $checker;
- /** @var IDateTimeFormatter|\PHPUnit\Framework\MockObject\MockObject */
- private $dateTimeFormatter;
/** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */
private $tempManager;
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
$this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker')
->disableOriginalConstructor()->getMock();
$this->logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
- $this->dateTimeFormatter = $this->getMockBuilder(IDateTimeFormatter::class)->getMock();
$this->tempManager = $this->getMockBuilder(ITempManager::class)->getMock();
$this->notificationManager = $this->getMockBuilder(IManager::class)->getMock();
$this->setupCheckManager = $this->createMock(ISetupCheckManager::class);
$this->l10n,
$this->checker,
$this->logger,
- $this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
->method('getAppValue')
->willReturnMap([
['files_external', 'user_certificate_scan', '', '["a", "b"]'],
- ['core', 'cronErrors', '', ''],
['dav', 'needs_system_address_book_sync', 'no', 'no'],
]);
$this->config->expects($this->any())
$expected = new DataResponse(
[
- 'cronInfo' => [
- 'diffInSeconds' => 123,
- 'relativeTime' => '2 hours ago',
- 'backgroundJobsUrl' => 'https://example.org',
- ],
- 'cronErrors' => [],
'isUsedTlsLibOutdated' => '',
'reverseProxyDocs' => 'reverse-proxy-doc-link',
'isCorrectMemcachedPHPModuleInstalled' => true,
$this->l10n,
$this->checker,
$this->logger,
- $this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
$this->l10n,
$this->checker,
$this->logger,
- $this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
$this->l10n,
$this->checker,
$this->logger,
- $this->dateTimeFormatter,
$this->tempManager,
$this->notificationManager,
$this->setupCheckManager,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: false,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html',
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: false,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
reverseProxyDocs: 'https://docs.nextcloud.com/foo/bar.html',
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: true,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: false,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: false,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,
isFairUseOfFreePushService: true,
isCorrectMemcachedPHPModuleInstalled: true,
isSettimelimitAvailable: true,
- cronErrors: [],
- cronInfo: {
- diffInSeconds: 0
- },
areWebauthnExtensionsEnabled: true,
isMysqlUsedWithoutUTF8MB4: false,
isEnoughTempSpaceAvailableIfS3PrimaryStorageIsUsed: true,