Last active
August 31, 2016 14:31
-
-
Save MacDada/a283554ec81ce3e4a68125a7c073edcf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment