diff options
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Settings/Admin/TipsTricksTest.php | 91 | ||||
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 6 |
2 files changed, 2 insertions, 95 deletions
diff --git a/tests/lib/Settings/Admin/TipsTricksTest.php b/tests/lib/Settings/Admin/TipsTricksTest.php deleted file mode 100644 index 2bbadab52cb..00000000000 --- a/tests/lib/Settings/Admin/TipsTricksTest.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch> - * - * @author Lukas Reschke <lukas@statuscode.ch> - * - * @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 <http://www.gnu.org/licenses/>. - * - */ - -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 5c4e2fe7a2c..8d268280900 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()); } |