summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-08-28 13:02:29 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-08-28 13:02:29 +0200
commit3f12ec95f0c220dfcfa9d495f981fee6ded4b002 (patch)
treeb324750d9c482f8cb91fa800a4fa84e77320f93c /tests/lib/AppFramework
parentcaf32d25f8635c86ed9c230dc495a4cf6afbfe3a (diff)
downloadnextcloud-server-3f12ec95f0c220dfcfa9d495f981fee6ded4b002.tar.gz
nextcloud-server-3f12ec95f0c220dfcfa9d495f981fee6ded4b002.zip
SessionMiddleware: declare session property
* Remove request since we don't useit * Update tests as well Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/AppFramework')
-rw-r--r--tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
index 8d097e3a8a1..813b0d54dc6 100644
--- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
@@ -25,20 +25,12 @@ class SessionMiddlewareTest extends \Test\TestCase {
/** @var ControllerMethodReflector */
private $reflector;
- /** @var Request */
- private $request;
-
/** @var Controller */
private $controller;
protected function setUp() {
parent::setUp();
- $this->request = new Request(
- [],
- $this->getMockBuilder('\OCP\Security\ISecureRandom')->getMock(),
- $this->getMockBuilder(IConfig::class)->getMock()
- );
$this->reflector = new ControllerMethodReflector();
$this->controller = $this->createMock(Controller::class);
}
@@ -50,7 +42,7 @@ class SessionMiddlewareTest extends \Test\TestCase {
$session = $this->getSessionMock(0);
$this->reflector->reflect($this, __FUNCTION__);
- $middleware = new SessionMiddleware($this->request, $this->reflector, $session);
+ $middleware = new SessionMiddleware($this->reflector, $session);
$middleware->beforeController($this->controller, __FUNCTION__);
}
@@ -61,7 +53,7 @@ class SessionMiddlewareTest extends \Test\TestCase {
$session = $this->getSessionMock(1);
$this->reflector->reflect($this, __FUNCTION__);
- $middleware = new SessionMiddleware($this->request, $this->reflector, $session);
+ $middleware = new SessionMiddleware($this->reflector, $session);
$middleware->afterController($this->controller, __FUNCTION__, new Response());
}
@@ -69,7 +61,7 @@ class SessionMiddlewareTest extends \Test\TestCase {
$session = $this->getSessionMock(1);
$this->reflector->reflect($this, __FUNCTION__);
- $middleware = new SessionMiddleware($this->request, $this->reflector, $session);
+ $middleware = new SessionMiddleware($this->reflector, $session);
$middleware->beforeController($this->controller, __FUNCTION__);
}
@@ -77,7 +69,7 @@ class SessionMiddlewareTest extends \Test\TestCase {
$session = $this->getSessionMock(0);
$this->reflector->reflect($this, __FUNCTION__);
- $middleware = new SessionMiddleware($this->request, $this->reflector, $session);
+ $middleware = new SessionMiddleware($this->reflector, $session);
$middleware->afterController($this->controller, __FUNCTION__, new Response());
}