aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Http
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-09-22 12:21:44 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-09-24 21:07:16 +0200
commitc257cd57d46143b6007f3c2cb80576c7320dc19e (patch)
tree524f24b43f5dd8edd12942a99bd8ec9e74f4ef00 /tests/lib/AppFramework/Http
parent4ee731c1ab20b3fb62c9e46abcc3ed717b891e59 (diff)
downloadnextcloud-server-c257cd57d46143b6007f3c2cb80576c7320dc19e.tar.gz
nextcloud-server-c257cd57d46143b6007f3c2cb80576c7320dc19e.zip
Handle SameSiteCookie check for index.php in AppFramework Middleware
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/AppFramework/Http')
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index f80bffcb480..40698ef8d73 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -1568,8 +1568,18 @@ class RequestTest extends \Test\TestCase {
}
public function testGetCookieParams() {
- $request = $this->createMock(Request::class);
- $actual = $this->invokePrivate($request, 'getCookieParams');
+ /** @var Request $request */
+ $request = $this->getMockBuilder(Request::class)
+ ->setMethods(['getScriptName'])
+ ->setConstructorArgs([
+ [],
+ $this->secureRandom,
+ $this->config,
+ $this->csrfTokenManager,
+ $this->stream
+ ])
+ ->getMock();
+ $actual = $request->getCookieParams();
$this->assertSame(session_get_cookie_params(), $actual);
}