summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-02 15:16:14 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-11-18 12:10:51 +0100
commitb2d9c20aac35e92e7a7b6838e02c7170991ef352 (patch)
tree06ec1da4c8fc98cf7dba15f357ca52e444b4ab98 /tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
parent922f51e9014d8331e9a593911de152ab20bd4811 (diff)
downloadnextcloud-server-b2d9c20aac35e92e7a7b6838e02c7170991ef352.tar.gz
nextcloud-server-b2d9c20aac35e92e7a7b6838e02c7170991ef352.zip
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php')
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
index 1fdcf485c28..480bff5f59f 100644
--- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
@@ -49,6 +49,7 @@ use OCP\IConfig;
use OCP\ILogger;
use OCP\INavigationManager;
use OCP\IRequest;
+use OCP\ISession;
use OCP\IURLGenerator;
use OCP\Security\ISecureRandom;
@@ -63,6 +64,8 @@ class SecurityMiddlewareTest extends \Test\TestCase {
private $secException;
/** @var SecurityException */
private $secAjaxException;
+ /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */
+ private $session;
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
private $request;
/** @var ControllerMethodReflector */
@@ -88,6 +91,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$this->logger = $this->createMock(ILogger::class);
$this->navigationManager = $this->createMock(INavigationManager::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
+ $this->session = $this->createMock(ISession::class);
$this->request = $this->createMock(IRequest::class);
$this->contentSecurityPolicyManager = $this->createMock(ContentSecurityPolicyManager::class);
$this->csrfTokenManager = $this->createMock(CsrfTokenManager::class);
@@ -109,6 +113,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$this->navigationManager,
$this->urlGenerator,
$this->logger,
+ $this->session,
'files',
$isLoggedIn,
$isAdminUser,