Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function testInterval()
- {
- $date = new DateTime('+1 month');
- $date->add(\DateInterval::createFromDateString('3 months'));
- // Tested on 2016-08-31
- // Failed asserting that two DateTime objects are equal.
- // Expected :2016-12-31T14:28:49+0000
- // Actual :2017-01-01T14:28:49+0000
- static::assertEquals(new DateTime('+4 months'), $date);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement