summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php')
-rw-r--r--tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php
index 3a06531eefd..0d27a9a070f 100644
--- a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php
@@ -34,13 +34,13 @@ use OCP\IUserSession;
use Test\TestCase;
class RateLimitingMiddlewareTest extends TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
- /** @var Limiter|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Limiter|\PHPUnit\Framework\MockObject\MockObject */
private $limiter;
/** @var RateLimitingMiddleware */
private $rateLimitingMiddleware;
@@ -90,13 +90,13 @@ class RateLimitingMiddlewareTest extends TestCase {
->expects($this->never())
->method('registerAnonRequest');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->rateLimitingMiddleware->beforeController($controller, 'testMethod');
}
public function testBeforeControllerForAnon() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
@@ -137,9 +137,9 @@ class RateLimitingMiddlewareTest extends TestCase {
}
public function testBeforeControllerForLoggedIn() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$this->userSession
@@ -185,7 +185,7 @@ class RateLimitingMiddlewareTest extends TestCase {
}
public function testBeforeControllerAnonWithFallback() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
@@ -229,19 +229,19 @@ class RateLimitingMiddlewareTest extends TestCase {
$this->rateLimitingMiddleware->beforeController($controller, 'testMethod');
}
-
+
public function testAfterExceptionWithOtherException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('My test exception');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->rateLimitingMiddleware->afterException($controller, 'testMethod', new \Exception('My test exception'));
}
public function testAfterExceptionWithJsonBody() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())
@@ -260,7 +260,7 @@ class RateLimitingMiddlewareTest extends TestCase {
}
public function testAfterExceptionWithHtmlBody() {
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->request
->expects($this->once())