@@ -271,7 +271,7 @@ public function testDiffFilteredNegativeWithSignWithSecondObject($class)
271271 */
272272 public function testBug188DiffWithSameDates ($ class )
273273 {
274- $ start = $ class ::create (2014 , 10 , 8 , 15 , 20 , 0 );
274+ $ start = $ class ::create (2014 , 10 , 8 );
275275 $ end = clone $ start ;
276276
277277 $ this ->assertSame (0 , $ start ->diffInDays ($ end ));
@@ -284,20 +284,33 @@ public function testBug188DiffWithSameDates($class)
284284 */
285285 public function testBug188DiffWithSameDates1DayApart ($ class )
286286 {
287- $ start = $ class ::create (2014 , 10 , 8 , 15 , 20 , 0 );
287+ $ start = $ class ::create (2014 , 10 , 8 );
288288 $ end = (clone $ start )->addDays (1 );
289289
290290 $ this ->assertSame (1 , $ start ->diffInDays ($ end ));
291291 $ this ->assertSame (1 , $ start ->diffInWeekdays ($ end ));
292292 }
293293
294+ /**
295+ * @dataProvider dateClassProvider
296+ * @return void
297+ */
298+ public function testDiffInDaysTwoWeeks ($ class )
299+ {
300+ $ start = $ class ::create (2014 , 10 , 8 );
301+ for ($ i = 1 ; $ i <= 14 ; $ i ++) {
302+ $ end = (clone $ start )->addDays ($ i );
303+ $ this ->assertSame ($ i , $ start ->diffInDays ($ end ));
304+ }
305+ }
306+
294307 /**
295308 * @dataProvider dateClassProvider
296309 * @return void
297310 */
298311 public function testBug188DiffWithDatesOnTheWeekend ($ class )
299312 {
300- $ start = $ class ::create (2014 , 1 , 1 , 0 , 0 , 0 );
313+ $ start = $ class ::create (2014 , 1 , 1 );
301314 $ start = $ start ->next ($ class ::SATURDAY );
302315 $ end = (clone $ start )->addDays (1 );
303316
0 commit comments