aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/Controller/ApiControllerTest.php
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 /apps/files/tests/Controller/ApiControllerTest.php
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 'apps/files/tests/Controller/ApiControllerTest.php')
-rw-r--r--apps/files/tests/Controller/ApiControllerTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php
index f79a5c7bb64..ad2a6a15b2b 100644
--- a/apps/files/tests/Controller/ApiControllerTest.php
+++ b/apps/files/tests/Controller/ApiControllerTest.php
@@ -113,12 +113,12 @@ class ApiControllerTest extends TestCase {
);
}
- public function testUpdateFileTagsEmpty() {
+ public function testUpdateFileTagsEmpty(): void {
$expected = new DataResponse([]);
$this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt'));
}
- public function testUpdateFileTagsWorking() {
+ public function testUpdateFileTagsWorking(): void {
$this->tagService->expects($this->once())
->method('updateFileTags')
->with('/path.txt', ['Tag1', 'Tag2']);
@@ -132,7 +132,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2']));
}
- public function testUpdateFileTagsNotFoundException() {
+ public function testUpdateFileTagsNotFoundException(): void {
$this->tagService->expects($this->once())
->method('updateFileTags')
->with('/path.txt', ['Tag1', 'Tag2'])
@@ -142,7 +142,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2']));
}
- public function testUpdateFileTagsStorageNotAvailableException() {
+ public function testUpdateFileTagsStorageNotAvailableException(): void {
$this->tagService->expects($this->once())
->method('updateFileTags')
->with('/path.txt', ['Tag1', 'Tag2'])
@@ -152,7 +152,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2']));
}
- public function testUpdateFileTagsStorageGenericException() {
+ public function testUpdateFileTagsStorageGenericException(): void {
$this->tagService->expects($this->once())
->method('updateFileTags')
->with('/path.txt', ['Tag1', 'Tag2'])
@@ -162,7 +162,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->updateFileTags('/path.txt', ['Tag1', 'Tag2']));
}
- public function testGetThumbnailInvalidSize() {
+ public function testGetThumbnailInvalidSize(): void {
$this->userFolder->method('get')
->with($this->equalTo(''))
->willThrowException(new NotFoundException());
@@ -170,7 +170,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->getThumbnail(0, 0, ''));
}
- public function testGetThumbnailInvalidImage() {
+ public function testGetThumbnailInvalidImage(): void {
$file = $this->createMock(File::class);
$file->method('getId')->willReturn(123);
$this->userFolder->method('get')
@@ -184,7 +184,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->getThumbnail(10, 10, 'unknown.jpg'));
}
- public function testGetThumbnailInvalidPartFile() {
+ public function testGetThumbnailInvalidPartFile(): void {
$file = $this->createMock(File::class);
$file->method('getId')->willReturn(0);
$this->userFolder->method('get')
@@ -194,7 +194,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $this->apiController->getThumbnail(10, 10, 'unknown.jpg'));
}
- public function testGetThumbnail() {
+ public function testGetThumbnail(): void {
$file = $this->createMock(File::class);
$file->method('getId')->willReturn(123);
$this->userFolder->method('get')
@@ -214,7 +214,7 @@ class ApiControllerTest extends TestCase {
$this->assertInstanceOf(Http\FileDisplayResponse::class, $ret);
}
- public function testShowHiddenFiles() {
+ public function testShowHiddenFiles(): void {
$show = false;
$this->config->expects($this->once())
@@ -227,7 +227,7 @@ class ApiControllerTest extends TestCase {
$this->assertEquals($expected, $actual);
}
- public function testCropImagePreviews() {
+ public function testCropImagePreviews(): void {
$crop = true;
$this->config->expects($this->once())