summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework')
-rw-r--r--tests/lib/AppFramework/Controller/ApiControllerTest.php3
-rw-r--r--tests/lib/AppFramework/Controller/ControllerTest.php3
-rw-r--r--tests/lib/AppFramework/Http/DispatcherTest.php13
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php2
-rw-r--r--tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php3
-rw-r--r--tests/lib/AppFramework/Middleware/MiddlewareTest.php3
-rw-r--r--tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php3
-rw-r--r--tests/lib/AppFramework/Routing/RoutingTest.php11
8 files changed, 24 insertions, 17 deletions
diff --git a/tests/lib/AppFramework/Controller/ApiControllerTest.php b/tests/lib/AppFramework/Controller/ApiControllerTest.php
index 74231b8d6ac..b7172ab6a9f 100644
--- a/tests/lib/AppFramework/Controller/ApiControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ApiControllerTest.php
@@ -26,6 +26,7 @@ namespace Test\AppFramework\Controller;
use OC\AppFramework\Http\Request;
use OCP\AppFramework\ApiController;
+use OCP\IConfig;
class ChildApiController extends ApiController {};
@@ -41,7 +42,7 @@ class ApiControllerTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php
index 5c8124c5e7f..ca71e9154ef 100644
--- a/tests/lib/AppFramework/Controller/ControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ControllerTest.php
@@ -29,6 +29,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\DataResponse;
+use OCP\IConfig;
class ChildController extends Controller {
@@ -79,7 +80,7 @@ class ControllerTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php
index c2d73adfd7b..eb08d00e358 100644
--- a/tests/lib/AppFramework/Http/DispatcherTest.php
+++ b/tests/lib/AppFramework/Http/DispatcherTest.php
@@ -31,6 +31,7 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Controller;
+use OCP\IConfig;
class TestController extends Controller {
@@ -301,7 +302,7 @@ class DispatcherTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
@@ -332,7 +333,7 @@ class DispatcherTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
@@ -366,7 +367,7 @@ class DispatcherTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
@@ -399,7 +400,7 @@ class DispatcherTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
@@ -433,7 +434,7 @@ class DispatcherTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
@@ -469,7 +470,7 @@ class DispatcherTest extends \Test\TestCase {
$this->getMockBuilder('\OCP\Security\ISecureRandom')
->disableOriginalConstructor()
->getMock(),
- $this->getMockBuilder('\OCP\IConfig')
+ $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock()
);
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index 40698ef8d73..d3f36a6d886 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -40,7 +40,7 @@ class RequestTest extends \Test\TestCase {
stream_wrapper_register('fakeinput', 'Test\AppFramework\Http\RequestStream');
$this->secureRandom = $this->getMockBuilder('\OCP\Security\ISecureRandom')->getMock();
- $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->config = $this->getMockBuilder(IConfig::class)->getMock();
$this->csrfTokenManager = $this->getMockBuilder('\OC\Security\CSRF\CsrfTokenManager')
->disableOriginalConstructor()->getMock();
}
diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
index f948e184f53..e71be9c5f16 100644
--- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
+++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
@@ -29,6 +29,7 @@ use OC\AppFramework\Middleware\MiddlewareDispatcher;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Middleware;
use OCP\AppFramework\Http\Response;
+use OCP\IConfig;
// needed to test ordering
@@ -133,7 +134,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
new Request(
['method' => 'GET'],
$this->getMockBuilder('\OCP\Security\ISecureRandom')->getMock(),
- $this->getMockBuilder('\OCP\IConfig')->getMock()
+ $this->getMockBuilder(IConfig::class)->getMock()
)
])->getMock();
}
diff --git a/tests/lib/AppFramework/Middleware/MiddlewareTest.php b/tests/lib/AppFramework/Middleware/MiddlewareTest.php
index c5c812839b2..07028745676 100644
--- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php
@@ -27,6 +27,7 @@ namespace Test\AppFramework\Middleware;
use OC\AppFramework\Http\Request;
use OCP\AppFramework\Middleware;
use OCP\AppFramework\Http\Response;
+use OCP\IConfig;
class ChildMiddleware extends Middleware {};
@@ -59,7 +60,7 @@ class MiddlewareTest extends \Test\TestCase {
new Request(
[],
$this->getMockBuilder('\OCP\Security\ISecureRandom')->getMock(),
- $this->getMockBuilder('\OCP\IConfig')->getMock()
+ $this->getMockBuilder(IConfig::class)->getMock()
)
])->getMock();
$this->exception = new \Exception();
diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
index 3c218bb53c7..8d097e3a8a1 100644
--- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
@@ -17,6 +17,7 @@ use OC\AppFramework\Middleware\SessionMiddleware;
use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Response;
+use OCP\IConfig;
class SessionMiddlewareTest extends \Test\TestCase {
@@ -36,7 +37,7 @@ class SessionMiddlewareTest extends \Test\TestCase {
$this->request = new Request(
[],
$this->getMockBuilder('\OCP\Security\ISecureRandom')->getMock(),
- $this->getMockBuilder('\OCP\IConfig')->getMock()
+ $this->getMockBuilder(IConfig::class)->getMock()
);
$this->reflector = new ControllerMethodReflector();
$this->controller = $this->createMock(Controller::class);
diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php
index d395584d011..76533fff014 100644
--- a/tests/lib/AppFramework/Routing/RoutingTest.php
+++ b/tests/lib/AppFramework/Routing/RoutingTest.php
@@ -5,6 +5,7 @@ namespace Test\AppFramework\Routing;
use OC\AppFramework\DependencyInjection\DIContainer;
use OC\AppFramework\Routing\RouteActionHandler;
use OC\AppFramework\Routing\RouteConfig;
+use OCP\ILogger;
class RoutingTest extends \Test\TestCase
{
@@ -130,7 +131,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
- ->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
+ ->setConstructorArgs([$this->getMockBuilder(ILogger::class)->getMock()])
->getMock();
// load route configuration
@@ -151,7 +152,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
- ->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
+ ->setConstructorArgs([$this->getMockBuilder(ILogger::class)->getMock()])
->getMock();
// load route configuration
@@ -212,7 +213,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
- ->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
+ ->setConstructorArgs([$this->getMockBuilder(ILogger::class)->getMock()])
->getMock();
// we expect create to be called once:
@@ -260,7 +261,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
- ->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
+ ->setConstructorArgs([$this->getMockBuilder(ILogger::class)->getMock()])
->getMock();
// we expect create to be called once:
@@ -287,7 +288,7 @@ class RoutingTest extends \Test\TestCase
// router mock
$router = $this->getMockBuilder('\OC\Route\Router')
->setMethods(['create'])
- ->setConstructorArgs([$this->getMockBuilder('\OCP\ILogger')->getMock()])
+ ->setConstructorArgs([$this->getMockBuilder(ILogger::class)->getMock()])
->getMock();
// route mocks