aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/PreviewControllerTest.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 /tests/Core/Controller/PreviewControllerTest.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 'tests/Core/Controller/PreviewControllerTest.php')
-rw-r--r--tests/Core/Controller/PreviewControllerTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/Core/Controller/PreviewControllerTest.php b/tests/Core/Controller/PreviewControllerTest.php
index 7c9a32eae38..4274f15e8ed 100644
--- a/tests/Core/Controller/PreviewControllerTest.php
+++ b/tests/Core/Controller/PreviewControllerTest.php
@@ -49,28 +49,28 @@ class PreviewControllerTest extends \Test\TestCase {
);
}
- public function testInvalidFile() {
+ public function testInvalidFile(): void {
$res = $this->controller->getPreview('');
$expected = new DataResponse([], Http::STATUS_BAD_REQUEST);
$this->assertEquals($expected, $res);
}
- public function testInvalidWidth() {
+ public function testInvalidWidth(): void {
$res = $this->controller->getPreview('file', 0);
$expected = new DataResponse([], Http::STATUS_BAD_REQUEST);
$this->assertEquals($expected, $res);
}
- public function testInvalidHeight() {
+ public function testInvalidHeight(): void {
$res = $this->controller->getPreview('file', 10, 0);
$expected = new DataResponse([], Http::STATUS_BAD_REQUEST);
$this->assertEquals($expected, $res);
}
- public function testFileNotFound() {
+ public function testFileNotFound(): void {
$userFolder = $this->createMock(Folder::class);
$this->rootFolder->method('getUserFolder')
->with($this->equalTo($this->userId))
@@ -86,7 +86,7 @@ class PreviewControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $res);
}
- public function testNotAFile() {
+ public function testNotAFile(): void {
$userFolder = $this->createMock(Folder::class);
$this->rootFolder->method('getUserFolder')
->with($this->equalTo($this->userId))
@@ -103,7 +103,7 @@ class PreviewControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $res);
}
- public function testNoPreviewAndNoIcon() {
+ public function testNoPreviewAndNoIcon(): void {
$userFolder = $this->createMock(Folder::class);
$this->rootFolder->method('getUserFolder')
->with($this->equalTo($this->userId))
@@ -124,7 +124,7 @@ class PreviewControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $res);
}
- public function testForbiddenFile() {
+ public function testForbiddenFile(): void {
$userFolder = $this->createMock(Folder::class);
$this->rootFolder->method('getUserFolder')
->with($this->equalTo($this->userId))
@@ -148,7 +148,7 @@ class PreviewControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $res);
}
- public function testNoPreview() {
+ public function testNoPreview(): void {
$userFolder = $this->createMock(Folder::class);
$this->rootFolder->method('getUserFolder')
->with($this->equalTo($this->userId))
@@ -180,7 +180,7 @@ class PreviewControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $res);
}
- public function testValidPreview() {
+ public function testValidPreview(): void {
$userFolder = $this->createMock(Folder::class);
$this->rootFolder->method('getUserFolder')
->with($this->equalTo($this->userId))