diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-04-17 20:03:26 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-05-03 08:58:24 +0200 |
commit | 9bfc108b79f793ed5dd6812d1ca193a38ba02231 (patch) | |
tree | d4fe8c492e669e346c2d4ec55acd8945ae2d21a5 /tests | |
parent | 1f2f7019319cd9f4cfa759be35aea0d888beaba8 (diff) | |
download | nextcloud-server-9bfc108b79f793ed5dd6812d1ca193a38ba02231.tar.gz nextcloud-server-9bfc108b79f793ed5dd6812d1ca193a38ba02231.zip |
Cleanup and fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Settings/Admin/MailTest.php (renamed from tests/lib/Settings/Admin/AdditionalTest.php) | 5 | ||||
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 30 |
2 files changed, 19 insertions, 16 deletions
diff --git a/tests/lib/Settings/Admin/AdditionalTest.php b/tests/lib/Settings/Admin/MailTest.php index 4a254da060b..445aa942059 100644 --- a/tests/lib/Settings/Admin/AdditionalTest.php +++ b/tests/lib/Settings/Admin/MailTest.php @@ -24,11 +24,12 @@ namespace Test\Settings\Admin; use OC\Settings\Admin\Additional; +use OC\Settings\Admin\Mail; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; use Test\TestCase; -class AdditionalTest extends TestCase { +class MailTest extends TestCase { /** @var Additional */ private $admin; /** @var IConfig */ @@ -38,7 +39,7 @@ class AdditionalTest extends TestCase { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); - $this->admin = new Additional( + $this->admin = new Mail( $this->config ); } diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index b218a347e85..d51a57598b3 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -115,24 +115,25 @@ class ManagerTest extends TestCase { $this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class); - $this->url->expects($this->exactly(6)) + $this->url->expects($this->exactly(7)) ->method('imagePath') ->willReturnMap([ - ['settings', 'admin.svg', '1'], + ['settings', 'admin.svg', '0'], + ['core', 'actions/settings-dark.svg', '1'], ['core', 'actions/share.svg', '2'], ['core', 'actions/password.svg', '3'], - ['core', 'actions/settings-dark.svg', '4'], - ['settings', 'help.svg', '5'], + ['settings', 'help.svg', '4'], ]); $this->assertEquals([ - 0 => [new Section('server', 'Basic settings', 0, '1')], + 0 => [new Section('overview', 'Overview', 0, '0')], + 1 => [new Section('server', 'Basic settings', 0, '1')], 5 => [new Section('sharing', 'Sharing', 0, '2')], 10 => [new Section('security', 'Security', 0, '3')], 45 => [new Section('encryption', 'Encryption', 0, '3')], 55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)], - 98 => [new Section('additional', 'Additional settings', 0, '4')], - 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '5')], + 98 => [new Section('additional', 'Additional settings', 0, '1')], + 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '4')], ], $this->manager->getAdminSections()); } @@ -166,23 +167,24 @@ class ManagerTest extends TestCase { ->method('t') ->will($this->returnArgument(0)); - $this->url->expects($this->exactly(6)) + $this->url->expects($this->exactly(7)) ->method('imagePath') ->willReturnMap([ - ['settings', 'admin.svg', '1'], + ['settings', 'admin.svg', '0'], + ['core', 'actions/settings-dark.svg', '1'], ['core', 'actions/share.svg', '2'], ['core', 'actions/password.svg', '3'], - ['core', 'actions/settings-dark.svg', '4'], - ['settings', 'help.svg', '5'], + ['settings', 'help.svg', '4'], ]); $this->assertEquals([ - 0 => [new Section('server', 'Basic settings', 0, '1')], + 0 => [new Section('overview', 'Overview', 0, '0')], + 1 => [new Section('server', 'Basic settings', 0, '1')], 5 => [new Section('sharing', 'Sharing', 0, '2')], 10 => [new Section('security', 'Security', 0, '3')], 45 => [new Section('encryption', 'Encryption', 0, '3')], - 98 => [new Section('additional', 'Additional settings', 0, '4')], - 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '5')], + 98 => [new Section('additional', 'Additional settings', 0, '1')], + 99 => [new Section('tips-tricks', 'Tips & tricks', 0, '4')], ], $this->manager->getAdminSections()); } |