aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php')
-rw-r--r--tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
index a8273be362b..aae1c53456b 100644
--- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
+++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
@@ -34,17 +34,16 @@ class TestMiddleware extends Middleware {
public $response;
public $output;
- private $beforeControllerThrowsEx;
-
/**
* @param boolean $beforeControllerThrowsEx
*/
- public function __construct($beforeControllerThrowsEx) {
+ public function __construct(
+ private $beforeControllerThrowsEx,
+ ) {
self::$beforeControllerCalled = 0;
self::$afterControllerCalled = 0;
self::$afterExceptionCalled = 0;
self::$beforeOutputCalled = 0;
- $this->beforeControllerThrowsEx = $beforeControllerThrowsEx;
}
public function beforeController($controller, $methodName) {
@@ -136,13 +135,13 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
public function testAfterExceptionShouldReturnResponseOfMiddleware(): void {
$response = new Response();
- $m1 = $this->getMockBuilder(\OCP\AppFramework\Middleware::class)
+ $m1 = $this->getMockBuilder(Middleware::class)
->onlyMethods(['afterException', 'beforeController'])
->getMock();
$m1->expects($this->never())
->method('afterException');
- $m2 = $this->getMockBuilder(\OCP\AppFramework\Middleware::class)
+ $m2 = $this->getMockBuilder(Middleware::class)
->onlyMethods(['afterException', 'beforeController'])
->getMock();
$m2->expects($this->once())