public function testFromStringIgnoreSecureFlag() { $this->
assertFalse(Cookie::
fromString('foo=bar; secure'
)->
isSecure());
$this->
assertFalse(Cookie::
fromString('foo=bar; secure', 'http://example.com/'
)->
isSecure());
} /**
* @dataProvider getExpireCookieStrings
*/
public function testFromStringAcceptsSeveralExpiresDateFormats($cookie) { $this->
assertEquals(1596185377, Cookie::
fromString($cookie)->
getExpiresTime());
} public static function getExpireCookieStrings() { return [ ['foo=bar; expires=Fri, 31-Jul-2020 08:49:37 GMT'
],
['foo=bar; expires=Fri, 31 Jul 2020 08:49:37 GMT'
],
['foo=bar; expires=Fri, 31-07-2020 08:49:37 GMT'
],
['foo=bar; expires=Fri, 31-07-20 08:49:37 GMT'
],
['foo=bar; expires=Friday, 31-Jul-20 08:49:37 GMT'
],
['foo=bar; expires=Fri Jul 31 08:49:37 2020'
],
[