From 49dd79eabb2b8902559a7a4e8f8fcad54f46b604 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Sun, 15 Sep 2024 22:32:31 +0200 Subject: refactor: Add void return type to PHPUnit test methods Signed-off-by: Christoph Wurst --- .../Middleware/AdditionalScriptsMiddlewareTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php') diff --git a/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php b/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php index 890735008fc..22b1b13aaee 100644 --- a/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/AdditionalScriptsMiddlewareTest.php @@ -44,7 +44,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { $this->controller = $this->createMock(Controller::class); } - public function testNoTemplateResponse() { + public function testNoTemplateResponse(): void { $this->userSession->expects($this->never()) ->method($this->anything()); $this->dispatcher->expects($this->never()) @@ -53,7 +53,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { $this->middleWare->afterController($this->controller, 'myMethod', $this->createMock(Response::class)); } - public function testPublicShareController() { + public function testPublicShareController(): void { $this->userSession->expects($this->never()) ->method($this->anything()); $this->dispatcher->expects($this->never()) @@ -62,7 +62,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { $this->middleWare->afterController($this->createMock(PublicShareController::class), 'myMethod', $this->createMock(Response::class)); } - public function testStandaloneTemplateResponse() { + public function testStandaloneTemplateResponse(): void { $this->userSession->expects($this->never()) ->method($this->anything()); $this->dispatcher->expects($this->once()) @@ -78,7 +78,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { $this->middleWare->afterController($this->controller, 'myMethod', $this->createMock(StandaloneTemplateResponse::class)); } - public function testTemplateResponseNotLoggedIn() { + public function testTemplateResponseNotLoggedIn(): void { $this->userSession->method('isLoggedIn') ->willReturn(false); $this->dispatcher->expects($this->once()) @@ -94,7 +94,7 @@ class AdditionalScriptsMiddlewareTest extends \Test\TestCase { $this->middleWare->afterController($this->controller, 'myMethod', $this->createMock(TemplateResponse::class)); } - public function testTemplateResponseLoggedIn() { + public function testTemplateResponseLoggedIn(): void { $events = []; $this->userSession->method('isLoggedIn') -- cgit v1.2.3