Skip to content

Commit

Permalink
Fix tests for php 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Feb 21, 2017
1 parent 8f7194e commit 21967f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/DateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public function setUp()
public function testConstructs()
{
$date = new Date;
$this->assertInstanceOf(Date::class, $date);
$this->assertInstanceOf('Jenssegers\Date\Date', $date);
}

public function testStaticNow()
{
$date = Date::now();
$this->assertInstanceOf(Date::class, $date);
$this->assertInstanceOf('Jenssegers\Date\Date', $date);
$this->assertEquals(time(), $date->getTimestamp());
}

Expand Down Expand Up @@ -60,8 +60,8 @@ public function testMake()

public function testManipulation()
{
$this->assertInstanceOf(Date::class, Date::now()->add('1 day'));
$this->assertInstanceOf(Date::class, Date::now()->sub('1 day'));
$this->assertInstanceOf('Jenssegers\Date\Date', Date::now()->add('1 day'));
$this->assertInstanceOf('Jenssegers\Date\Date', Date::now()->sub('1 day'));

$this->assertSame(86400, Date::now()->add('1 day')->getTimestamp() - Date::now()->getTimestamp());
$this->assertSame(4 * 86400, Date::now()->add('4 day')->getTimestamp() - Date::now()->getTimestamp());
Expand Down

0 comments on commit 21967f1

Please sign in to comment.