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 /apps/settings/tests/Middleware/SubadminMiddlewareTest.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 'apps/settings/tests/Middleware/SubadminMiddlewareTest.php')
-rw-r--r-- | apps/settings/tests/Middleware/SubadminMiddlewareTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php index 1a832c528bf..c4672a06d49 100644 --- a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php +++ b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php @@ -44,7 +44,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { } - public function testBeforeControllerAsUserWithExemption() { + public function testBeforeControllerAsUserWithExemption(): void { $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\NotAdminException::class); $this->reflector @@ -58,7 +58,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { } - public function testBeforeControllerAsUserWithoutExemption() { + public function testBeforeControllerAsUserWithoutExemption(): void { $this->reflector ->expects($this->once()) ->method('hasAnnotation') @@ -67,7 +67,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { $this->subadminMiddleware->beforeController($this->controller, 'foo'); } - public function testBeforeControllerAsSubAdminWithoutExemption() { + public function testBeforeControllerAsSubAdminWithoutExemption(): void { $this->reflector ->expects($this->exactly(2)) ->method('hasAnnotation') @@ -78,7 +78,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { $this->subadminMiddlewareAsSubAdmin->beforeController($this->controller, 'foo'); } - public function testBeforeControllerAsSubAdminWithExemption() { + public function testBeforeControllerAsSubAdminWithExemption(): void { $this->reflector ->expects($this->once()) ->method('hasAnnotation') @@ -87,14 +87,14 @@ class SubadminMiddlewareTest extends \Test\TestCase { $this->subadminMiddlewareAsSubAdmin->beforeController($this->controller, 'foo'); } - public function testAfterNotAdminException() { + public function testAfterNotAdminException(): void { $expectedResponse = new TemplateResponse('core', '403', [], 'guest'); $expectedResponse->setStatus(403); $this->assertEquals($expectedResponse, $this->subadminMiddleware->afterException($this->controller, 'foo', new NotAdminException(''))); } - public function testAfterRegularException() { + public function testAfterRegularException(): void { $this->expectException(\Exception::class); $expectedResponse = new TemplateResponse('core', '403', [], 'guest'); |