Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-12 17:16:29 +0300
committerMorris Jobke <hey@morrisjobke.de>2018-06-13 13:05:38 +0300
commit4a0b7aaf6c80f59552b1da861432476a8ac4c7cf (patch)
tree21f748733edd5fa5c93dc785c8f1b93a931f12e0 /tests/Settings
parentc4a2632d9539fb8c406b1027fdb445cea8310ee0 (diff)
Merge tips & tricks section into setup checks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/Controller/AdminSettingsControllerTest.php5
-rw-r--r--tests/Settings/Controller/CheckSetupControllerTest.php11
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/Settings/Controller/AdminSettingsControllerTest.php b/tests/Settings/Controller/AdminSettingsControllerTest.php
index d5650b397fa..5bc48803024 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 7760be16499..f0e19e007f2 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());