Merge branch '3.2' into 3.3
* 3.2: fix merge
This commit is contained in:
commit
d09aeaf0fd
@ -165,7 +165,7 @@ class CookieTest extends TestCase
|
||||
$this->assertEquals('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; max-age='.($expire - time()).'; path=/; domain=.myfoodomain.com; secure; httponly', (string) $cookie, '->__toString() returns string representation of the cookie');
|
||||
|
||||
$cookie = new Cookie('foo', 'bar with white spaces', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true);
|
||||
$this->assertEquals('foo=bar%20with%20white%20spaces; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure; httponly', (string) $cookie, '->__toString() encodes the value of the cookie according to RFC 3986 (white space = %20)');
|
||||
$this->assertEquals('foo=bar%20with%20white%20spaces; expires=Fri, 20-May-2011 15:25:52 GMT; max-age='.($expire - time()).'; path=/; domain=.myfoodomain.com; secure; httponly', (string) $cookie, '->__toString() encodes the value of the cookie according to RFC 3986 (white space = %20)');
|
||||
|
||||
$cookie = new Cookie('foo', null, 1, '/admin/', '.myfoodomain.com');
|
||||
$this->assertEquals('foo=deleted; expires='.gmdate('D, d-M-Y H:i:s T', $expire = time() - 31536001).'; max-age='.($expire - time()).'; path=/admin/; domain=.myfoodomain.com; httponly', (string) $cookie, '->__toString() returns string representation of a cleared cookie if value is NULL');
|
||||
@ -178,7 +178,7 @@ class CookieTest extends TestCase
|
||||
{
|
||||
$cookie = new Cookie('foo', 'b a r', 0, '/', null, false, false);
|
||||
$this->assertFalse($cookie->isRaw());
|
||||
$this->assertEquals('foo=b+a+r; path=/', (string) $cookie);
|
||||
$this->assertEquals('foo=b%20a%20r; path=/', (string) $cookie);
|
||||
|
||||
$cookie = new Cookie('foo', 'b+a+r', 0, '/', null, false, false, true);
|
||||
$this->assertTrue($cookie->isRaw());
|
||||
|
Reference in New Issue
Block a user