t('Security & setup warnings'));?>
-
t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the Tips & Tricks section and the documentation for more information.'));?>
+
t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.'));?>
t('Please double check the installation guides ↗, and check for any errors or warnings in the log.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])] )); ?>
+
+
diff --git a/settings/templates/settings/admin/tipstricks.php b/settings/templates/settings/admin/tipstricks.php
deleted file mode 100644
index 3ab337e06f..0000000000
--- a/settings/templates/settings/admin/tipstricks.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * @author Arthur Schiwon
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- */
-
-/** @var \OCP\IL10N $l */
-/** @var array $_ */
-
-?>
-
-
-
t('Tips & tricks'));?>
-
t('There are a lot of features and config switches available to optimally customize and use this instance. Here are some pointers for more information.')); ?>
-
-
diff --git a/tests/Settings/Controller/AdminSettingsControllerTest.php b/tests/Settings/Controller/AdminSettingsControllerTest.php
index d5650b397f..5bc4880302 100644
--- a/tests/Settings/Controller/AdminSettingsControllerTest.php
+++ b/tests/Settings/Controller/AdminSettingsControllerTest.php
@@ -22,10 +22,9 @@
*/
namespace Tests\Settings\Controller;
-use OC\Settings\Admin\TipsTricks;
+use OC\Settings\Admin\ServerDevNotice;
use OC\Settings\Controller\AdminSettingsController;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\IConfig;
use OCP\INavigationManager;
use OCP\IRequest;
use OCP\Settings\IManager;
@@ -88,7 +87,7 @@ class AdminSettingsControllerTest extends TestCase {
->expects($this->once())
->method('getAdminSettings')
->with('test')
- ->willReturn([5 => new TipsTricks($this->getMockBuilder(IConfig::class)->getMock())]);
+ ->willReturn([5 => new ServerDevNotice()]);
$expected = new TemplateResponse('settings', 'settings/frame', ['forms' => ['personal' => [], 'admin' => []], 'content' => '']);
$this->assertEquals($expected, $this->adminSettingsController->index('test'));
diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php
index 7760be1649..f0e19e007f 100644
--- a/tests/Settings/Controller/CheckSetupControllerTest.php
+++ b/tests/Settings/Controller/CheckSetupControllerTest.php
@@ -103,7 +103,7 @@ class CheckSetupControllerTest extends TestCase {
$this->logger,
$this->dispatcher,
])
- ->setMethods(['getCurlVersion', 'isPhpOutdated', 'isOpcacheProperlySetup', 'hasFreeTypeSupport', 'hasMissingIndexes'])->getMock();
+ ->setMethods(['getCurlVersion', 'isPhpOutdated', 'isOpcacheProperlySetup', 'hasFreeTypeSupport', 'hasMissingIndexes', 'isSqliteUsed'])->getMock();
}
public function testIsInternetConnectionWorkingDisabledViaConfig() {
@@ -332,12 +332,19 @@ class CheckSetupControllerTest extends TestCase {
->method('linkToDocs')
->with('admin-php-opcache')
->willReturn('http://docs.example.org/server/go.php?to=admin-php-opcache');
+ $this->urlGenerator->expects($this->at(5))
+ ->method('linkToDocs')
+ ->with('admin-db-conversion')
+ ->willReturn('http://docs.example.org/server/go.php?to=admin-db-conversion');
$this->checkSetupController
->method('hasFreeTypeSupport')
->willReturn(false);
$this->checkSetupController
->method('hasMissingIndexes')
->willReturn([]);
+ $this->checkSetupController
+ ->method('isSqliteUsed')
+ ->willReturn(false);
$expected = new DataResponse(
[
@@ -361,6 +368,8 @@ class CheckSetupControllerTest extends TestCase {
'isSettimelimitAvailable' => true,
'hasFreeTypeSupport' => false,
'hasMissingIndexes' => [],
+ 'isSqliteUsed' => false,
+ 'databaseConversionDocumentation' => 'http://docs.example.org/server/go.php?to=admin-db-conversion',
]
);
$this->assertEquals($expected, $this->checkSetupController->check());
diff --git a/tests/lib/Settings/Admin/TipsTricksTest.php b/tests/lib/Settings/Admin/TipsTricksTest.php
deleted file mode 100644
index 2bbadab52c..0000000000
--- a/tests/lib/Settings/Admin/TipsTricksTest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- *
- * @author Lukas Reschke
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- */
-
-namespace Test\Settings\Admin;
-
-use OC\Settings\Admin\TipsTricks;
-use OCP\AppFramework\Http\TemplateResponse;
-use OCP\IConfig;
-use Test\TestCase;
-
-class TipsTrickTest extends TestCase {
- /** @var TipsTricks */
- private $admin;
- /** @var IConfig */
- private $config;
-
- public function setUp() {
- parent::setUp();
- $this->config = $this->getMockBuilder(IConfig::class)->getMock();
-
- $this->admin = new TipsTricks(
- $this->config
- );
- }
-
- public function testGetFormWithExcludedGroupsWithSQLite() {
- $this->config
- ->expects($this->once())
- ->method('getSystemValue')
- ->with('dbtype')
- ->willReturn('sqlite');
-
- $expected = new TemplateResponse(
- 'settings',
- 'settings/admin/tipstricks',
- [
- 'databaseOverload' => true,
- ],
- ''
- );
-
- $this->assertEquals($expected, $this->admin->getForm());
- }
-
- public function testGetFormWithExcludedGroupsWithoutSQLite() {
- $this->config
- ->expects($this->once())
- ->method('getSystemValue')
- ->with('dbtype')
- ->willReturn('mysql');
-
- $expected = new TemplateResponse(
- 'settings',
- 'settings/admin/tipstricks',
- [
- 'databaseOverload' => false,
- ],
- ''
- );
-
- $this->assertEquals($expected, $this->admin->getForm());
- }
-
- public function testGetSection() {
- $this->assertSame('tips-tricks', $this->admin->getSection());
- }
-
- public function testGetPriority() {
- $this->assertSame(0, $this->admin->getPriority());
- }
-}
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php
index 5c4e2fe7a2..8d26828090 100644
--- a/tests/lib/Settings/ManagerTest.php
+++ b/tests/lib/Settings/ManagerTest.php
@@ -115,7 +115,7 @@ class ManagerTest extends TestCase {
$this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class);
- $this->url->expects($this->exactly(7))
+ $this->url->expects($this->exactly(6))
->method('imagePath')
->willReturnMap([
['settings', 'admin.svg', '0'],
@@ -133,7 +133,6 @@ class ManagerTest extends TestCase {
45 => [new Section('encryption', 'Encryption', 0, '3')],
55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)],
98 => [new Section('additional', 'Additional settings', 0, '1')],
- 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '4')],
], $this->manager->getAdminSections());
}
@@ -167,7 +166,7 @@ class ManagerTest extends TestCase {
->method('t')
->will($this->returnArgument(0));
- $this->url->expects($this->exactly(7))
+ $this->url->expects($this->exactly(6))
->method('imagePath')
->willReturnMap([
['settings', 'admin.svg', '0'],
@@ -184,7 +183,6 @@ class ManagerTest extends TestCase {
10 => [new Section('security', 'Security', 0, '3')],
45 => [new Section('encryption', 'Encryption', 0, '3')],
98 => [new Section('additional', 'Additional settings', 0, '1')],
- 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '4')],
], $this->manager->getAdminSections());
}