diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-06-12 16:16:29 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-06-13 12:05:38 +0200 |
commit | 4a0b7aaf6c80f59552b1da861432476a8ac4c7cf (patch) | |
tree | 21f748733edd5fa5c93dc785c8f1b93a931f12e0 /tests/Settings | |
parent | c4a2632d9539fb8c406b1027fdb445cea8310ee0 (diff) | |
download | nextcloud-server-4a0b7aaf6c80f59552b1da861432476a8ac4c7cf.tar.gz nextcloud-server-4a0b7aaf6c80f59552b1da861432476a8ac4c7cf.zip |
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.php | 5 | ||||
-rw-r--r-- | tests/Settings/Controller/CheckSetupControllerTest.php | 11 |
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()); |