diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
commit | 49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch) | |
tree | 2af18db46ba463368dc4461d7436fb69577923de /tests/lib/AppFramework/Controller/ControllerTest.php | |
parent | 4281ce6fa1bb8235426099d720734d2394bec203 (diff) | |
download | nextcloud-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/AppFramework/Controller/ControllerTest.php')
-rw-r--r-- | tests/lib/AppFramework/Controller/ControllerTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index 7a6b3460947..7c466e3a5b7 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -79,21 +79,21 @@ class ControllerTest extends \Test\TestCase { } - public function testFormatResonseInvalidFormat() { + public function testFormatResonseInvalidFormat(): void { $this->expectException(\DomainException::class); $this->controller->buildResponse(null, 'test'); } - public function testFormat() { + public function testFormat(): void { $response = $this->controller->buildResponse(['hi'], 'json'); $this->assertEquals(['hi'], $response->getData()); } - public function testFormatDataResponseJSON() { + public function testFormatDataResponseJSON(): void { $expectedHeaders = [ 'test' => 'something', 'Cache-Control' => 'no-cache, no-store, must-revalidate', @@ -113,7 +113,7 @@ class ControllerTest extends \Test\TestCase { } - public function testCustomFormatter() { + public function testCustomFormatter(): void { $response = $this->controller->custom('hi'); $response = $this->controller->buildResponse($response, 'json'); @@ -121,14 +121,14 @@ class ControllerTest extends \Test\TestCase { } - public function testDefaultResponderToJSON() { + public function testDefaultResponderToJSON(): void { $responder = $this->controller->getResponderByHTTPHeader('*/*'); $this->assertEquals('json', $responder); } - public function testResponderAcceptHeaderParsed() { + public function testResponderAcceptHeaderParsed(): void { $responder = $this->controller->getResponderByHTTPHeader( '*/*, application/tom, application/json' ); @@ -137,7 +137,7 @@ class ControllerTest extends \Test\TestCase { } - public function testResponderAcceptHeaderParsedUpperCase() { + public function testResponderAcceptHeaderParsedUpperCase(): void { $responder = $this->controller->getResponderByHTTPHeader( '*/*, apPlication/ToM, application/json' ); |