Skip to content

Commit d5ec782

Browse files
committed
Fix test
1 parent a3e1c30 commit d5ec782

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

spec/CookieUtilSpec.php

+24-24
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function it_parses_cookie_date_string($cookieDateString, $expectedString)
1414
{
1515
$this->beConstructedThrough('parseDate', [$cookieDateString]);
1616
$this->shouldHaveType('\DateTime');
17-
$this->format('l, d-M-Y H:i:s T')->shouldReturn($expectedString);
17+
$this->format('l, d-M-Y H:i:s O')->shouldReturn($expectedString);
1818
}
1919

2020
/**
@@ -34,30 +34,30 @@ function it_throws_an_exception_if_cookie_date_string_is_unparseable($cookieDate
3434
public function getCookieStrings()
3535
{
3636
return [
37-
['Friday, 31 Jul 20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
38-
['Friday, 31-Jul-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
39-
['Fri, 31-Jul-2020 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
40-
['Fri, 31 Jul 2020 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
41-
['Fri, 31-07-2020 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
42-
['Fri, 31-07-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
43-
['Friday, 31-Jul-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
44-
['Fri Jul 31 08:49:37 2020', 'Friday, 31-Jul-2020 08:49:37 GMT'],
45-
['Friday July 31st 2020, 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 GMT'],
37+
['Friday, 31 Jul 20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
38+
['Friday, 31-Jul-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
39+
['Fri, 31-Jul-2020 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
40+
['Fri, 31 Jul 2020 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
41+
['Fri, 31-07-2020 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
42+
['Fri, 31-07-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
43+
['Friday, 31-Jul-20 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
44+
['Fri Jul 31 08:49:37 2020', 'Friday, 31-Jul-2020 08:49:37 +0000'],
45+
['Friday July 31st 2020, 08:49:37 GMT', 'Friday, 31-Jul-2020 08:49:37 +0000'],
4646
// https://github.com/salesforce/tough-cookie/blob/master/test/date_test.js#L52
47-
['Wed, 09 Jun 2021 10:18:14 GMT', 'Wednesday, 09-Jun-2021 10:18:14 GMT'],
48-
['Wed, 09 Jun 2021 22:18:14 GMT', 'Wednesday, 09-Jun-2021 22:18:14 GMT'],
49-
['Tue, 18 Oct 2011 07:42:42.123 GMT', 'Tuesday, 18-Oct-2011 07:42:42 GMT'],
50-
['18 Oct 2011 07:42:42 GMT', 'Tuesday, 18-Oct-2011 07:42:42 GMT'],
51-
['8 Oct 2011 7:42:42 GMT', 'Saturday, 08-Oct-2011 07:42:42 GMT'],
52-
['8 Oct 2011 7:2:42 GMT', 'Saturday, 08-Oct-2011 07:02:42 GMT'],
53-
['Oct 18 2011 07:42:42 GMT', 'Tuesday, 18-Oct-2011 07:42:42 GMT'],
54-
['Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)', 'Tuesday, 18-Oct-2011 07:05:03 GMT+0000'],
55-
['09 Jun 2021 10:18:14 GMT', 'Wednesday, 09-Jun-2021 10:18:14 GMT'],
56-
['01 Jan 1970 00:00:00 GMT', 'Thursday, 01-Jan-1970 00:00:00 GMT'],
57-
['01 Jan 1601 00:00:00 GMT', 'Monday, 01-Jan-1601 00:00:00 GMT'],
58-
['10 Feb 81 13:00:00 GMT', 'Tuesday, 10-Feb-1981 13:00:00 GMT'], // implicit year
59-
['Thu, 17-Apr-2014 02:12:29 GMT', 'Thursday, 17-Apr-2014 02:12:29 GMT'], // dashes
60-
['Thu, 17-Apr-2014 02:12:29 UTC', 'Thursday, 17-Apr-2014 02:12:29 UTC'], // dashes and UTC
47+
['Wed, 09 Jun 2021 10:18:14 GMT', 'Wednesday, 09-Jun-2021 10:18:14 +0000'],
48+
['Wed, 09 Jun 2021 22:18:14 GMT', 'Wednesday, 09-Jun-2021 22:18:14 +0000'],
49+
['Tue, 18 Oct 2011 07:42:42.123 GMT', 'Tuesday, 18-Oct-2011 07:42:42 +0000'],
50+
['18 Oct 2011 07:42:42 GMT', 'Tuesday, 18-Oct-2011 07:42:42 +0000'],
51+
['8 Oct 2011 7:42:42 GMT', 'Saturday, 08-Oct-2011 07:42:42 +0000'],
52+
['8 Oct 2011 7:2:42 GMT', 'Saturday, 08-Oct-2011 07:02:42 +0000'],
53+
['Oct 18 2011 07:42:42 GMT', 'Tuesday, 18-Oct-2011 07:42:42 +0000'],
54+
['Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)', 'Tuesday, 18-Oct-2011 07:05:03 +0000'],
55+
['09 Jun 2021 10:18:14 GMT', 'Wednesday, 09-Jun-2021 10:18:14 +0000'],
56+
['01 Jan 1970 00:00:00 GMT', 'Thursday, 01-Jan-1970 00:00:00 +0000'],
57+
['01 Jan 1601 00:00:00 GMT', 'Monday, 01-Jan-1601 00:00:00 +0000'],
58+
['10 Feb 81 13:00:00 GMT', 'Tuesday, 10-Feb-1981 13:00:00 +0000'], // implicit year
59+
['Thu, 17-Apr-2014 02:12:29 GMT', 'Thursday, 17-Apr-2014 02:12:29 +0000'], // dashes
60+
['Thu, 17-Apr-2014 02:12:29 UTC', 'Thursday, 17-Apr-2014 02:12:29 +0000'], // dashes and UTC
6161
];
6262
}
6363

0 commit comments

Comments
 (0)