Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-06-19 10:31:47 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-06-22 14:02:50 +0300
commitc21a976bc41c5246f7c43c62531d6305ddbd830c (patch)
treea2ef700c4a75758f5f710c2c386d99191ee08e56 /tests
parentd1c19fbe2382edada8d050cf917e4452c5dee0c1 (diff)
Allow to specify the cookie type for appframework responses
In general it is good to set them to Lax. But also to give devs more control over them is not a bad thing. Helps with #21474 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Http/ResponseTest.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php
index f33d0a0089d..ea1e74de50e 100644
--- a/tests/lib/AppFramework/Http/ResponseTest.php
+++ b/tests/lib/AppFramework/Http/ResponseTest.php
@@ -108,10 +108,12 @@ class ResponseTest extends \Test\TestCase {
'foo' => [
'value' => 'bar',
'expireDate' => null,
+ 'sameSite' => 'Lax',
],
'bar' => [
'value' => 'foo',
- 'expireDate' => new \DateTime('1970-01-01')
+ 'expireDate' => new \DateTime('1970-01-01'),
+ 'sameSite' => 'Lax',
]
];
$this->assertEquals($expectedResponse, $this->childResponse->getCookies());
@@ -143,7 +145,8 @@ class ResponseTest extends \Test\TestCase {
$expected = [
'foo' => [
'value' => 'expired',
- 'expireDate' => new \DateTime('1971-01-01')
+ 'expireDate' => new \DateTime('1971-01-01'),
+ 'sameSite' => 'Lax',
]
];
@@ -159,11 +162,13 @@ class ResponseTest extends \Test\TestCase {
$expected = [
'foo' => [
'value' => 'bar',
- 'expireDate' => null
+ 'expireDate' => null,
+ 'sameSite' => 'Lax',
],
'bar' => [
'value' => 'foo',
- 'expireDate' => null
+ 'expireDate' => null,
+ 'sameSite' => 'Lax',
]
];
$cookies = $this->childResponse->getCookies();
@@ -173,11 +178,13 @@ class ResponseTest extends \Test\TestCase {
$expected = [
'foo' => [
'value' => 'expired',
- 'expireDate' => new \DateTime('1971-01-01')
+ 'expireDate' => new \DateTime('1971-01-01'),
+ 'sameSite' => 'Lax',
],
'bar' => [
'value' => 'expired',
- 'expireDate' => new \DateTime('1971-01-01')
+ 'expireDate' => new \DateTime('1971-01-01'),
+ 'sameSite' => 'Lax',
]
];