Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Aug 13, 2020
1 parent 2576d31 commit 1320852
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions tests/Carbon/ModifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public function testTimezoneModify()
$a = new Carbon('2014-03-30 00:00:00', 'Europe/London');
$b = $a->copy();
$b->addHours(24);
$this->assertSame(23.0, $a->diffInRealHours($b, false));
$this->assertSame(23.0, $b->diffInRealHours($a));
$this->assertSame(-23.0, $b->diffInRealHours($a, false));
$this->assertSame(-23.0 * 60, $b->diffInRealMinutes($a, false));
$this->assertSame(-23.0 * 60 * 60, $b->diffInRealSeconds($a, false));
$this->assertSame(-23.0 * 60 * 60 * 1000, $b->diffInRealMilliseconds($a, false));
$this->assertSame(-23.0 * 60 * 60 * 1000000, $b->diffInRealMicroseconds($a, false));
$this->assertSame(23.0, $a->diffInRealHours($b));
$this->assertSame(23.0, $b->diffInRealHours($a, true));
$this->assertSame(-23.0, $b->diffInRealHours($a));
$this->assertSame(-23.0 * 60, $b->diffInRealMinutes($a));
$this->assertSame(-23.0 * 60 * 60, $b->diffInRealSeconds($a));
$this->assertSame(-23.0 * 60 * 60 * 1000, $b->diffInRealMilliseconds($a));
$this->assertSame(-23.0 * 60 * 60 * 1000000, $b->diffInRealMicroseconds($a));

$a = new Carbon('2014-03-30 00:00:00', 'Europe/London');
$b = $a->copy();
Expand Down
14 changes: 7 additions & 7 deletions tests/CarbonImmutable/ModifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public function testTimezoneModify()

$a = new Carbon('2014-03-30 00:00:00', 'Europe/London');
$b = $a->addHours(24);
$this->assertSame(23.0, $a->diffInHours($b, false));
$this->assertSame(23.0, $b->diffInHours($a));
$this->assertSame(-23.0, $b->diffInHours($a, false));
$this->assertSame(-23.0 * 60, $b->diffInMinutes($a, false));
$this->assertSame(-23.0 * 60 * 60, $b->diffInSeconds($a, false));
$this->assertSame(-23.0 * 60 * 60 * 1000, $b->diffInMilliseconds($a, false));
$this->assertSame(-23.0 * 60 * 60 * 1000000, $b->diffInMicroseconds($a, false));
$this->assertSame(23.0, $a->diffInHours($b));
$this->assertSame(23.0, $b->diffInHours($a, true));
$this->assertSame(-23.0, $b->diffInHours($a));
$this->assertSame(-23.0 * 60, $b->diffInMinutes($a));
$this->assertSame(-23.0 * 60 * 60, $b->diffInSeconds($a));
$this->assertSame(-23.0 * 60 * 60 * 1000, $b->diffInMilliseconds($a));
$this->assertSame(-23.0 * 60 * 60 * 1000000, $b->diffInMicroseconds($a));

$a = new Carbon('2014-03-30 00:00:00', 'Europe/London');
$b = $a->addRealHours(24);
Expand Down

0 comments on commit 1320852

Please sign in to comment.