diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2020-06-22 13:00:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 13:00:12 +0200 |
commit | 859941db3228286be0bea1692ce39624df3236f6 (patch) | |
tree | 4d144da8d7ba82a2f23e06f1fd7c8d64e1062018 /tests | |
parent | a899b4775d3d5843bd5c83af8e74cab2219c71d1 (diff) | |
parent | fbf9772a3eafeab74cc5b3f76e7ad7cc081991bb (diff) | |
download | nextcloud-server-859941db3228286be0bea1692ce39624df3236f6.tar.gz nextcloud-server-859941db3228286be0bea1692ce39624df3236f6.zip |
Merge pull request #21479 from nextcloud/fix/21474/allow_specifying_cookie_type
Allow to specify the cookie type for appframework responses
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/AppFramework/Http/ResponseTest.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 435dde7d345..dd82809dd85 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', ] ]; |