diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php index 47d479b18a1..c0988ff5a11 100644 --- a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php @@ -37,6 +37,7 @@ use OCP\AppFramework\Http\Attribute\UserRateLimit; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\IRequest; +use OCP\ISession; use OCP\IUser; use OCP\IUserSession; use PHPUnit\Framework\MockObject\MockObject; @@ -77,6 +78,7 @@ class RateLimitingMiddlewareTest extends TestCase { private IUserSession|MockObject $userSession; private ControllerMethodReflector $reflector; private Limiter|MockObject $limiter; + private ISession|MockObject $session; private RateLimitingMiddleware $rateLimitingMiddleware; protected function setUp(): void { @@ -86,12 +88,14 @@ class RateLimitingMiddlewareTest extends TestCase { $this->userSession = $this->createMock(IUserSession::class); $this->reflector = new ControllerMethodReflector(); $this->limiter = $this->createMock(Limiter::class); + $this->session = $this->createMock(ISession::class); $this->rateLimitingMiddleware = new RateLimitingMiddleware( $this->request, $this->userSession, $this->reflector, - $this->limiter + $this->limiter, + $this->session ); } |