aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Test/Repair
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/Test/Repair
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/Test/Repair')
-rw-r--r--tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php10
-rw-r--r--tests/Test/Repair/Owncloud/CleanPreviewsTest.php6
-rw-r--r--tests/Test/Repair/Owncloud/UpdateLanguageCodesTest.php4
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php b/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
index 2138004c3dc..64db9459390 100644
--- a/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
+++ b/tests/Test/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php
@@ -55,7 +55,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
);
}
- public function testCleanupPreviewsUnfinished() {
+ public function testCleanupPreviewsUnfinished(): void {
$userFolder = $this->createMock(Folder::class);
$userRoot = $this->createMock(Folder::class);
$thumbnailFolder = $this->createMock(Folder::class);
@@ -100,7 +100,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$this->job->run(['uid' => 'myuid']);
}
- public function testCleanupPreviewsFinished() {
+ public function testCleanupPreviewsFinished(): void {
$userFolder = $this->createMock(Folder::class);
$userRoot = $this->createMock(Folder::class);
$thumbnailFolder = $this->createMock(Folder::class);
@@ -143,7 +143,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
}
- public function testNoUserFolder() {
+ public function testNoUserFolder(): void {
$this->rootFolder->method('getUserFolder')
->with($this->equalTo('myuid'))
->willThrowException(new NotFoundException());
@@ -158,7 +158,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$this->job->run(['uid' => 'myuid']);
}
- public function testNoThumbnailFolder() {
+ public function testNoThumbnailFolder(): void {
$userFolder = $this->createMock(Folder::class);
$userRoot = $this->createMock(Folder::class);
@@ -182,7 +182,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
$this->job->run(['uid' => 'myuid']);
}
- public function testNotPermittedToDelete() {
+ public function testNotPermittedToDelete(): void {
$userFolder = $this->createMock(Folder::class);
$userRoot = $this->createMock(Folder::class);
$thumbnailFolder = $this->createMock(Folder::class);
diff --git a/tests/Test/Repair/Owncloud/CleanPreviewsTest.php b/tests/Test/Repair/Owncloud/CleanPreviewsTest.php
index 10d2e5d216c..02f257a89b3 100644
--- a/tests/Test/Repair/Owncloud/CleanPreviewsTest.php
+++ b/tests/Test/Repair/Owncloud/CleanPreviewsTest.php
@@ -41,11 +41,11 @@ class CleanPreviewsTest extends TestCase {
);
}
- public function testGetName() {
+ public function testGetName(): void {
$this->assertSame('Add preview cleanup background jobs', $this->repair->getName());
}
- public function testRun() {
+ public function testRun(): void {
$user1 = $this->createMock(IUser::class);
$user1->method('getUID')
->willReturn('user1');
@@ -92,7 +92,7 @@ class CleanPreviewsTest extends TestCase {
}
- public function testRunAlreadyDoone() {
+ public function testRunAlreadyDoone(): void {
$this->userManager->expects($this->never())
->method($this->anything());
diff --git a/tests/Test/Repair/Owncloud/UpdateLanguageCodesTest.php b/tests/Test/Repair/Owncloud/UpdateLanguageCodesTest.php
index 879223bed4c..5bfd2e1e6d0 100644
--- a/tests/Test/Repair/Owncloud/UpdateLanguageCodesTest.php
+++ b/tests/Test/Repair/Owncloud/UpdateLanguageCodesTest.php
@@ -33,7 +33,7 @@ class UpdateLanguageCodesTest extends TestCase {
$this->config = $this->createMock(IConfig::class);
}
- public function testRun() {
+ public function testRun(): void {
$users = [
['userid' => 'user1', 'configvalue' => 'fi_FI'],
['userid' => 'user2', 'configvalue' => 'de'],
@@ -131,7 +131,7 @@ class UpdateLanguageCodesTest extends TestCase {
}
}
- public function testSecondRun() {
+ public function testSecondRun(): void {
/** @var IOutput|\PHPUnit_Framework_MockObject_MockObject $outputMock */
$outputMock = $this->createMock(IOutput::class);
$outputMock->expects($this->never())