Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 26d8274

Browse files
committed
[Zend_Http] Test case for multiple cookies zendframework#295
1 parent 0b689b7 commit 26d8274

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Zend/Http/Header/SetCookieTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,21 @@ public function testAddingAsRawHeaderToResponseObject($cStr, $info, $expected)
237237
$response->setRawHeader($cookie);
238238
$this->assertContains((string)$cookie, $response->sendHeaders());
239239
}
240+
241+
/**
242+
* @group GH-295
243+
*/
244+
public function testMultipleCookies()
245+
{
246+
$setCookieHeader = new Zend_Http_Header_SetCookie('othername1', 'othervalue1');
247+
$appendCookie = new Zend_Http_Header_SetCookie('othername2', 'othervalue2');
248+
$headerLine = $setCookieHeader->toStringMultipleHeaders(array($appendCookie));
249+
250+
$response = new Zend_Controller_Response_HttpTestCase();
251+
$response->setRawHeader($headerLine);
252+
253+
$this->assertEquals((array)$headerLine, $response->sendHeaders());
254+
}
240255

241256
/**
242257
* Provide valid cookie strings with information about them

0 commit comments

Comments
 (0)