aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Settings
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
commit49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch)
tree2af18db46ba463368dc4461d7436fb69577923de /tests/lib/Settings
parent4281ce6fa1bb8235426099d720734d2394bec203 (diff)
downloadnextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz
nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Settings')
-rw-r--r--tests/lib/Settings/ManagerTest.php18
-rw-r--r--tests/lib/Settings/SectionTest.php6
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php
index 6ed8ed74359..90c195e6bd0 100644
--- a/tests/lib/Settings/ManagerTest.php
+++ b/tests/lib/Settings/ManagerTest.php
@@ -64,7 +64,7 @@ class ManagerTest extends TestCase {
);
}
- public function testGetAdminSections() {
+ public function testGetAdminSections(): void {
$this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class);
$section = \OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class);
@@ -77,7 +77,7 @@ class ManagerTest extends TestCase {
], $this->manager->getAdminSections());
}
- public function testGetPersonalSections() {
+ public function testGetPersonalSections(): void {
$this->manager->registerSection('personal', \OCA\WorkflowEngine\Settings\Section::class);
$section = \OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class);
@@ -90,11 +90,11 @@ class ManagerTest extends TestCase {
], $this->manager->getPersonalSections());
}
- public function testGetAdminSectionsEmptySection() {
+ public function testGetAdminSectionsEmptySection(): void {
$this->assertEquals([], $this->manager->getAdminSections());
}
- public function testGetPersonalSectionsEmptySection() {
+ public function testGetPersonalSectionsEmptySection(): void {
$this->l10nFactory
->expects($this->once())
->method('get')
@@ -108,7 +108,7 @@ class ManagerTest extends TestCase {
$this->assertEquals([], $this->manager->getPersonalSections());
}
- public function testGetAdminSettings() {
+ public function testGetAdminSettings(): void {
$section = $this->createMock(ISettings::class);
$section->method('getPriority')
->willReturn(13);
@@ -126,7 +126,7 @@ class ManagerTest extends TestCase {
], $settings);
}
- public function testGetAdminSettingsAsSubAdmin() {
+ public function testGetAdminSettingsAsSubAdmin(): void {
$section = $this->createMock(ISettings::class);
$section->method('getPriority')
->willReturn(13);
@@ -142,7 +142,7 @@ class ManagerTest extends TestCase {
$this->assertEquals([], $settings);
}
- public function testGetSubAdminSettingsAsSubAdmin() {
+ public function testGetSubAdminSettingsAsSubAdmin(): void {
$section = $this->createMock(ISubAdminSettings::class);
$section->method('getPriority')
->willReturn(13);
@@ -161,7 +161,7 @@ class ManagerTest extends TestCase {
], $settings);
}
- public function testGetPersonalSettings() {
+ public function testGetPersonalSettings(): void {
$section = $this->createMock(ISettings::class);
$section->method('getPriority')
->willReturn(16);
@@ -195,7 +195,7 @@ class ManagerTest extends TestCase {
], $settings);
}
- public function testSameSectionAsPersonalAndAdmin() {
+ public function testSameSectionAsPersonalAndAdmin(): void {
$this->l10nFactory
->expects($this->once())
->method('get')
diff --git a/tests/lib/Settings/SectionTest.php b/tests/lib/Settings/SectionTest.php
index 964256f303c..dd69f8ae110 100644
--- a/tests/lib/Settings/SectionTest.php
+++ b/tests/lib/Settings/SectionTest.php
@@ -10,13 +10,13 @@ use OC\Settings\Section;
use Test\TestCase;
class SectionTest extends TestCase {
- public function testGetID() {
+ public function testGetID(): void {
$this->assertSame('ldap', (new Section('ldap', 'name', 1))->getID());
}
- public function testGetName() {
+ public function testGetName(): void {
$this->assertSame('name', (new Section('ldap', 'name', 1))->getName());
}
- public function testGetPriority() {
+ public function testGetPriority(): void {
$this->assertSame(1, (new Section('ldap', 'name', 1))->getPriority());
}
}