Skip to content

Commit

Permalink
[Zend_Http] Test case for multiple cookies zendframework#295
Browse files Browse the repository at this point in the history
  • Loading branch information
froschdesign committed Nov 29, 2014
1 parent 0b689b7 commit 26d8274
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Zend/Http/Header/SetCookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,21 @@ public function testAddingAsRawHeaderToResponseObject($cStr, $info, $expected)
$response->setRawHeader($cookie);
$this->assertContains((string)$cookie, $response->sendHeaders());
}

/**
* @group GH-295
*/
public function testMultipleCookies()
{
$setCookieHeader = new Zend_Http_Header_SetCookie('othername1', 'othervalue1');
$appendCookie = new Zend_Http_Header_SetCookie('othername2', 'othervalue2');
$headerLine = $setCookieHeader->toStringMultipleHeaders(array($appendCookie));

$response = new Zend_Controller_Response_HttpTestCase();
$response->setRawHeader($headerLine);

$this->assertEquals((array)$headerLine, $response->sendHeaders());
}

/**
* Provide valid cookie strings with information about them
Expand Down

0 comments on commit 26d8274

Please sign in to comment.