diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-11 21:32:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-12 13:55:19 +0200 |
commit | 234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch) | |
tree | 880cec2bf4fe4846eff9fa5aa68d2671fb0495be /tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php | |
parent | 138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff) | |
download | nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip |
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php')
-rw-r--r-- | tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php | 26 |
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()) |