-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathAdminSettingsTest.php
More file actions
52 lines (44 loc) · 1.22 KB
/
AdminSettingsTest.php
File metadata and controls
52 lines (44 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Libresign\Tests\Unit\Settings;
use OCA\Libresign\AppInfo\Application;
use OCA\Libresign\Settings\AdminSettings;
use OCP\IL10N;
use OCP\IURLGenerator;
/**
* @internal
*/
final class AdminSettingsTest extends \OCA\Libresign\Tests\Unit\TestCase {
private AdminSettings $adminSettings;
public function setUp(): void {
$l10n = $this->createMock(IL10N::class);
$l10n
->method('t')
->willReturnArgument(0);
$urlGenerator = $this->createMock(IURLGenerator::class);
$this->adminSettings = new AdminSettings(
$l10n,
$urlGenerator
);
}
public function testGetId():void {
$actual = $this->adminSettings->getID();
$this->assertEquals(Application::APP_ID, $actual);
}
public function testGetName():void {
$actual = $this->adminSettings->getName();
$this->assertEquals('LibreSign', $actual);
}
public function testGetPriority():void {
$actual = $this->adminSettings->getPriority();
$this->assertEquals(60, $actual);
}
public function testGetIcon():void {
$actual = $this->adminSettings->getIcon();
$this->assertIsString($actual);
}
}