@@ -122,7 +122,7 @@ public function testHumanizeMonthsForward(): void
122122 $ current = Time::parse ('March 1, 2017 ' , 'America/Chicago ' );
123123 $ diff = $ current ->difference ('May 1, 2017 ' , 'America/Chicago ' );
124124
125- $ this ->assertSame ('in 1 month ' , $ diff ->humanize ('en ' ));
125+ $ this ->assertSame ('in 2 months ' , $ diff ->humanize ('en ' ));
126126 }
127127
128128 public function testHumanizeDaysSingle (): void
@@ -213,12 +213,20 @@ public function testHumanizeWeeksPlural(): void
213213 $ this ->assertSame ('2 weeks ago ' , $ diff ->humanize ('en ' ));
214214 }
215215
216- public function testHumanizeWeeksForward (): void
216+ public function testHumanizeWeeksForwardDST (): void
217217 {
218218 $ current = Time::parse ('March 10, 2017 ' , 'America/Chicago ' );
219219 $ diff = $ current ->difference ('March 18, 2017 ' , 'America/Chicago ' );
220220
221- $ this ->assertSame ('in 1 week ' , $ diff ->humanize ('en ' ));
221+ $ this ->assertSame ('in 2 weeks ' , $ diff ->humanize ('en ' ));
222+ }
223+
224+ public function testHumanizeWeeksForwardUTC (): void
225+ {
226+ $ current = Time::parse ('2017-03-10 ' );
227+ $ diff = $ current ->difference ('2017-03-18 ' );
228+
229+ $ this ->assertSame ('in 2 weeks ' , $ diff ->humanize ('en ' ));
222230 }
223231
224232 public function testHumanizeNoDifference (): void
@@ -240,14 +248,14 @@ public function testGetterUTC(): void
240248 $ this ->assertNull ($ diff ->nonsense );
241249 }
242250
243- public function testGetterChicagoTime (): void
251+ public function testGetterDST (): void
244252 {
245253 $ current = Time::parse ('March 10, 2017 ' , 'America/Chicago ' );
246254 $ diff = $ current ->difference ('March 18, 2017 ' , 'America/Chicago ' );
247255
248256 // Daylight Saving Time had begun since Sun, 12 Mar, 02:00.
249- $ this ->assertSame (7 , $ diff ->getDays ());
250- $ this ->assertSame (7 , $ diff ->days );
257+ $ this ->assertSame (8 , $ diff ->getDays ());
258+ $ this ->assertSame (8 , $ diff ->days );
251259
252260 // The raw value does not take Daylight Saving Time into account.
253261 $ this ->assertSame (-8 , (int ) round ($ diff ->getDays (true )));
0 commit comments