Skip to content

Commit

Permalink
Added test for issue briannesbitt#1075.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavic committed Feb 5, 2018
1 parent 6770b86 commit 51dbfd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ cache:
- $HOME/.composer/cache

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.0.22
- 7.1
- hhvm
- 7.1.2

env:
global:
Expand Down
13 changes: 5 additions & 8 deletions tests/IssueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@

class IssueTest extends AbstractTestCase
{
public function testIssue1073()
public function testIssue1075()
{
$date = \DateTime::createFromFormat('Y-m-d\TH:i:s.uT', '2017-07-29T13:57:27.123456Z');
$d1 = $date->format('Y-m-d H:i:s.u e'); // 2017-07-29 13:57:27.123456 Z

$date = Carbon::createFromFormat('Y-m-d\TH:i:s.uT', '2017-07-29T13:57:27.123456Z');
$d2 = $date->format('Y-m-d H:i:s.u e'); // 2017-07-29 13:57:27.000000 Z

$this->assertTrue($d1 === $d2);
$d = Carbon::parse('2018-01-23T03:30:45-5:00');
$d->addHours(1)->addMinutes(1);

$this->assertEquals('2018-01-23T04:31:45-05:00', $d->format('c'));
}
}

0 comments on commit 51dbfd7

Please sign in to comment.