13 $setCookie = SetCookie::fromSetCookieString($cookieString);
15 $this->assertEquals($expectedSetCookie, $setCookie);
16 $this->assertEquals($cookieString, (
string) $setCookie);
27 'someCookie=someValue',
29 ->withValue(
'someValue')
32 'LSID=DQAAAK%2FEaem_vYg; Path=/accounts; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly',
34 ->withValue(
'DQAAAK/Eaem_vYg')
35 ->withPath(
'/accounts')
36 ->withExpires(
'Wed, 13 Jan 2021 22:23:01 GMT')
41 'HSID=AYQEVn%2F.DKrdst; Domain=.foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; HttpOnly',
43 ->withValue(
'AYQEVn/.DKrdst')
44 ->withDomain(
'.foo.com')
46 ->withExpires(
'Wed, 13 Jan 2021 22:23:01 GMT')
50 'SSID=Ap4P%2F.GTEq; Domain=foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly',
52 ->withValue(
'Ap4P/.GTEq')
53 ->withDomain(
'foo.com')
55 ->withExpires(
'Wed, 13 Jan 2021 22:23:01 GMT')
60 'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; HttpOnly',
62 ->withValue(
'Rg3vHJZnehYLjVg7qi3bZjzg')
63 ->withExpires(
'Tue, 15-Jan-2013 21:47:38 GMT')
65 ->withDomain(
'.example.com')
69 'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Max-Age=500; Secure; HttpOnly',
71 ->withValue(
'Rg3vHJZnehYLjVg7qi3bZjzg')
74 ->withDomain(
'.example.com')
79 'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; Max-Age=500; Secure; HttpOnly',
81 ->withValue(
'Rg3vHJZnehYLjVg7qi3bZjzg')
82 ->withExpires(
'Tue, 15-Jan-2013 21:47:38 GMT')
85 ->withDomain(
'.example.com')
90 'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; Max-Age=500; Secure; HttpOnly',
92 ->withValue(
'Rg3vHJZnehYLjVg7qi3bZjzg')
93 ->withExpires(1358286458)
96 ->withDomain(
'.example.com')
101 'lu=Rg3vHJZnehYLjVg7qi3bZjzg; Domain=.example.com; Path=/; Expires=Tue, 15 Jan 2013 21:47:38 GMT; Max-Age=500; Secure; HttpOnly',
103 ->withValue(
'Rg3vHJZnehYLjVg7qi3bZjzg')
104 ->withExpires(
new \
DateTime(
'Tue, 15-Jan-2013 21:47:38 GMT'))
107 ->withDomain(
'.example.com')
121 $this->assertLessThan(
time(), $setCookie->getExpires());
131 $fourYearsFromNow = (new \DateTime(
'+4 years'))->getTimestamp();
132 $this->assertGreaterThan($fourYearsFromNow, $setCookie->getExpires());
it_parses_from_set_cookie_string($cookieString, SetCookie $expectedSetCookie)
provideParsesFromSetCookieStringData()
static create($name, $value=null)
static createRememberedForever($name, $value=null)
it_creates_long_living_cookies()
static createExpired($name)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.