|
@@ 78-84 (lines=7) @@
|
| 75 |
|
$this->assertEquals(BnDateTime::create($bnDateTime), $bnDateTime); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
public function testFactoryShouldReturnBnDateTimeObjectWithSameNativeDateTime() |
| 79 |
|
{ |
| 80 |
|
$dateTime = new \DateTime('now'); |
| 81 |
|
$bnDateTime = BnDateTime::create($dateTime); |
| 82 |
|
$this->assertInstanceOf('EasyBanglaDate\Types\BnDateTime', $bnDateTime); |
| 83 |
|
$this->assertEquals($bnDateTime->getTimestamp(), $dateTime->getTimestamp()); |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
public function testFactoryShouldReturnBnDateTimeObjectFromTimeStamp() |
| 87 |
|
{ |
|
@@ 86-92 (lines=7) @@
|
| 83 |
|
$this->assertEquals($bnDateTime->getTimestamp(), $dateTime->getTimestamp()); |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
public function testFactoryShouldReturnBnDateTimeObjectFromTimeStamp() |
| 87 |
|
{ |
| 88 |
|
$time = time(); |
| 89 |
|
$bnDateTime = BnDateTime::create($time); |
| 90 |
|
$this->assertInstanceOf('EasyBanglaDate\Types\BnDateTime', $bnDateTime); |
| 91 |
|
$this->assertEquals($bnDateTime->getTimestamp(), $time); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
/** |
| 95 |
|
* @expectedException \Exception |