summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-11 21:32:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-12 13:55:19 +0200
commit234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch)
tree880cec2bf4fe4846eff9fa5aa68d2671fb0495be /tests/lib/AppFramework
parent138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff)
downloadnextcloud-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')
-rw-r--r--tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php8
-rw-r--r--tests/lib/AppFramework/Controller/PublicShareControllerTest.php6
-rw-r--r--tests/lib/AppFramework/DependencyInjection/DIContainerTest.php2
-rw-r--r--tests/lib/AppFramework/Http/FileDisplayResponseTest.php2
-rw-r--r--tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php6
-rw-r--r--tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php22
-rw-r--r--tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php4
-rw-r--r--tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php8
-rw-r--r--tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php26
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php4
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php16
11 files changed, 52 insertions, 52 deletions
diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php
index 4c79adcb4a7..c0aea813243 100644
--- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php
+++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php
@@ -32,14 +32,14 @@ use OCP\IURLGenerator;
class AuthPublicShareControllerTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var AuthPublicShareController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AuthPublicShareController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
diff --git a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php
index 521c45e47c6..f2a60a574af 100644
--- a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php
+++ b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php
@@ -29,12 +29,12 @@ use OCP\ISession;
class PublicShareControllerTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var PublicShareController|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var PublicShareController|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php
index ba114433a4c..3004123b81b 100644
--- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php
+++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php
@@ -37,7 +37,7 @@ use OCP\Security\ISecureRandom;
*/
class DIContainerTest extends \Test\TestCase {
- /** @var DIContainer|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var DIContainer|\PHPUnit\Framework\MockObject\MockObject */
private $container;
protected function setUp(): void {
diff --git a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php
index 5ca7635614c..0a244a85754 100644
--- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php
+++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php
@@ -28,7 +28,7 @@ use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\Files\File;
class FileDisplayResponseTest extends \Test\TestCase {
- /** @var File|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var File|\PHPUnit\Framework\MockObject\MockObject */
private $file;
/** @var FileDisplayResponse */
diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php
index ed6d06d4bf5..7e7140971e4 100644
--- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php
@@ -38,11 +38,11 @@ use OCP\IURLGenerator;
class PublicShareMiddlewareTest extends \Test\TestCase {
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
/** @var PublicShareMiddleware */
diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
index 55c874ccdb5..f8db85a9358 100644
--- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
@@ -30,11 +30,11 @@ use OCP\IRequest;
use Test\TestCase;
class BruteForceMiddlewareTest extends TestCase {
- /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
- /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */
private $throttler;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
/** @var BruteForceMiddleware */
private $bruteForceMiddleware;
@@ -73,7 +73,7 @@ class BruteForceMiddlewareTest extends TestCase {
->method('sleepDelay')
->with('127.0.0.1', 'login');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->beforeController($controller, 'testMethod');
}
@@ -94,13 +94,13 @@ class BruteForceMiddlewareTest extends TestCase {
->expects($this->never())
->method('sleepDelay');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->beforeController($controller, 'testMethod');
}
public function testAfterControllerWithAnnotationAndThrottledRequest() {
- /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */
+ /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
$this->reflector
->expects($this->once())
@@ -133,13 +133,13 @@ class BruteForceMiddlewareTest extends TestCase {
->method('registerAttempt')
->with('login', '127.0.0.1');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
}
public function testAfterControllerWithAnnotationAndNotThrottledRequest() {
- /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */
+ /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
$this->reflector
->expects($this->once())
@@ -163,7 +163,7 @@ class BruteForceMiddlewareTest extends TestCase {
->expects($this->never())
->method('registerAttempt');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
$this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
}
@@ -184,9 +184,9 @@ class BruteForceMiddlewareTest extends TestCase {
->expects($this->never())
->method('sleepDelay');
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
- /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */
+ /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
$this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
}
diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php
index a7bf2b14271..4853b527bf3 100644
--- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php
@@ -27,7 +27,7 @@ class CORSMiddlewareTest extends \Test\TestCase {
/** @var ControllerMethodReflector */
private $reflector;
- /** @var Session|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Session|\PHPUnit\Framework\MockObject\MockObject */
private $session;
/** @var Throttler */
private $throttler;
@@ -254,7 +254,7 @@ class CORSMiddlewareTest extends \Test\TestCase {
$this->assertEquals($expected, $response);
}
-
+
public function testAfterExceptionWithRegularException() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('A regular exception');
diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php
index 7a64b6cbcad..3153d7f0b08 100644
--- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php
@@ -36,17 +36,17 @@ use Test\TestCase;
class PasswordConfirmationMiddlewareTest extends TestCase {
/** @var ControllerMethodReflector */
private $reflector;
- /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */
private $session;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
private $userSession;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
private $user;
/** @var PasswordConfirmationMiddleware */
private $middleware;
/** @var Controller */
private $contoller;
- /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
protected function setUp(): void {
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())
diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php
index 6f3c3f32adc..61f5eeb5aea 100644
--- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php
@@ -37,10 +37,10 @@ class SameSiteCookieMiddlewareTest extends TestCase {
/** @var SameSiteCookieMiddleware */
private $middleware;
- /** @var Request|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Request|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */
private $reflector;
protected function setUp(): void {
diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
index 69f1aa5d547..680c3937836 100644
--- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
@@ -47,27 +47,27 @@ use OCP\Security\ISecureRandom;
class SecurityMiddlewareTest extends \Test\TestCase {
- /** @var SecurityMiddleware|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SecurityMiddleware|\PHPUnit\Framework\MockObject\MockObject */
private $middleware;
- /** @var Controller|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Controller|\PHPUnit\Framework\MockObject\MockObject */
private $controller;
/** @var SecurityException */
private $secException;
/** @var SecurityException */
private $secAjaxException;
- /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
/** @var ControllerMethodReflector */
private $reader;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */
private $navigationManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
private $urlGenerator;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
private $appManager;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
protected function setUp(): void {