Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] Fix cookie to string conversion for raw cookies #20910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update CookieTest.php
  • Loading branch information
ro0NL authored Dec 13, 2016
commit 0a8e77a72aabf2174edbe7c05f6f0e5390a8fea4
8 changes: 4 additions & 4 deletions 8 src/Symfony/Component/HttpFoundation/Tests/CookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public function testToString()

public function testRawCookie()
{
$cookie = new Cookie('foo', 'b a r', 3600, '/', '.myfoodomain.com', false, true);
$cookie = new Cookie('foo', 'b a r', 0, '/', null, false, false);
$this->assertFalse($cookie->isRaw());
$this->assertEquals('foo=b+a+r; expires=Thu, 01-Jan-1970 01:00:00 GMT; path=/; domain=.myfoodomain.com; httponly', (string) $cookie);
$this->assertEquals('foo=b+a+r; path=/', (string) $cookie);

$cookie = new Cookie('foo', 'b+a+r', 3600, '/', '.myfoodomain.com', false, true, true);
$cookie = new Cookie('foo', 'b+a+r', 0, '/', null, false, false, true);
$this->assertTrue($cookie->isRaw());
$this->assertEquals('foo=b+a+r; expires=Thu, 01-Jan-1970 01:00:00 GMT; path=/; domain=.myfoodomain.com; httponly', (string) $cookie);
$this->assertEquals('foo=b+a+r; path=/', (string) $cookie);
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.