aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/tests/Settings
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-05-17 00:52:16 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-05-20 15:00:54 +0200
commite8e0f97c9a934ba9da4f4f4c092a5f8683500164 (patch)
treeb90dbe6efcb02a5c590cacc2bdd67a786ecf6e36 /apps/settings/tests/Settings
parent87ce03db1ac8f1d7313850128528e5b8f06fce66 (diff)
downloadnextcloud-server-e8e0f97c9a934ba9da4f4f4c092a5f8683500164.tar.gz
nextcloud-server-e8e0f97c9a934ba9da4f4f4c092a5f8683500164.zip
Port BackgroundJob admin settings to vue
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/tests/Settings')
-rw-r--r--apps/settings/tests/Settings/Admin/ServerTest.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php
index acabf9abf5e..c5958c29421 100644
--- a/apps/settings/tests/Settings/Admin/ServerTest.php
+++ b/apps/settings/tests/Settings/Admin/ServerTest.php
@@ -38,6 +38,7 @@ use OCP\AppFramework\Services\IInitialState;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\IUrlGenerator;
use OCP\IL10N;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -60,6 +61,8 @@ class ServerTest extends TestCase {
private $config;
/** @var IL10N|MockObject */
private $l10n;
+ /** @var IUrlGenerator|MockObject */
+ private $urlGenerator;
protected function setUp(): void {
parent::setUp();
@@ -69,6 +72,7 @@ class ServerTest extends TestCase {
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);
$this->l10n = $this->createMock(IL10N::class);
+ $this->urlGenerator = $this->createMock(IUrlGenerator::class);
$this->admin = $this->getMockBuilder(Server::class)
->onlyMethods(['cronMaxAge'])
@@ -77,6 +81,7 @@ class ServerTest extends TestCase {
$this->initialStateService,
$this->profileManager,
$this->timeFactory,
+ $this->urlGenerator,
$this->config,
$this->l10n,
])
@@ -95,8 +100,8 @@ class ServerTest extends TestCase {
$this->config
->expects($this->at(1))
->method('getAppValue')
- ->with('core', 'lastcron', false)
- ->willReturn(false);
+ ->with('core', 'lastcron', '0')
+ ->willReturn('0');
$this->config
->expects($this->at(2))
->method('getAppValue')
@@ -110,12 +115,6 @@ class ServerTest extends TestCase {
'settings',
'settings/admin/server',
[
- 'backgroundjobs_mode' => 'ajax',
- 'lastcron' => false,
- 'cronErrors' => '',
- 'cronMaxAge' => 1337,
- 'cli_based_cron_possible' => true,
- 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', // to not explode here because of posix extension not being disabled - which is already checked in the line above
'profileEnabledGlobally' => true,
],
''